2015-08-28 28 views

回答

1

所以,我已經設法解決這個問題。
其實,解決的辦法是一樣的,我prequel question

# put SELinux in permissive mode 
setenforce 0 
# send USR1 signal to nginx master process 
# master process reopens files, does chown() and chmod() to enable 
# the worker processes to write to files, and send a notification to 
# the worker procesess, so they reopen files instantly 
# you can find the path to the nginx pid file in the nginx.conf 
kill -USR1 `cat /var/run/nginx.pid` 
# create SELinux module 
grep nginx /var/log/audit/audit.log | audit2allow -M nginx 
# apply module 
semodule -i nginx.pp 
# put SELinux back in enforcing mode 
setenforce 1 
# remove SELinux module files 
rm -rf nginx.{pp,te} 
0

該問題可能是該目錄的權限設置不同的嘗試將日誌中的文檔根目錄的地方,所以你可以測試它是否是一個權限問題。更新我與您的調查結果,我可能會幫助

+0

它不是目錄權限的問題。代表擁有該進程的用戶創建文件。這意味着我的日誌文件是由nginx的主進程創建的,而不是工作者創建的。 – seelts

+0

我有類似的問題。你是怎麼解決的? –

相關問題