您的位置:首页 > 运维架构 > Apache

Set privilege of folder under Apache of Linux

2013-05-21 14:58 323 查看
you don't have to set
rwx
for
'other'. You should change the owner and/or group of the particular folder/file you are trying to protect. E.g.:
chown -R cwd:www-data /var/www/cwd.com
chmod 750 /var/www/cwd.com


Now only members of the group
www-data
can
read
/var/www/cwd.com
.
And only you (cwd) can write to it. If you want to allow your applications (through Apache) to write/modify files in that directory too you chmod it to 770.

I think this covers all your issues, I see no reason to change the user apache is running under.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: