本文介绍了Nginx配置权限和所有权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的Nginx.conf使用www-data作为用户.对于单个Nginx配置文件(/etc/nginx/conf.d/),我应该如何设置我的权限和所有权.
My Nginx.conf uses www-data as the user. For individual Nginx configuration files (/etc/nginx/conf.d/) how should I have my permissions and ownership set.
root & 744 ?
推荐答案
只要守护进程可以读取权限,Nginx的权限就无关紧要,因此 root:
和 744
可能是理想的.
The permissions should not matter to Nginx as long as the daemon can read it, so root:
and 744
are probably ideal.
请注意,除非对安全性至关重要,否则通常在/etc/
中的所有文件都应以 root:root
且通常为 744
拥有.防止用户或利用服务进行危险的篡改.
As a note, generally all files in /etc/
should be owned as root:root
and generally 744
unless security-critical to prevent dangerous tampering by users or exploited services.
这篇关于Nginx配置权限和所有权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!