开发者

Can File system ACL's help me keep php scripts away from other users

开发者 https://www.devze.com 2023-03-28 21:24 出处:网络
Many of my php scripts have got 644 permission and I would prefer that to be set to 400 开发者_如何学Pythonso thatother users on the system can\'t access them unless called by webserver. Is it possibl

Many of my php scripts have got 644 permission and I would prefer that to be set to 400 开发者_如何学Pythonso that other users on the system can't access them unless called by webserver. Is it possible to set any file system acl to achieve this without fiddling with apache/php/suphp?


If you're talking about setting file permissions in Linux:

chmod 400 filename


ACL's is, what you are looking for. by using ACL's you can set very granular restrictive access rules and also keep access for service users, like wwwrun and so on. It is important, that your filesystem supports ACL's.

Use the getfacl and setfacl commands Here is an small tutorial: http://www.gnutoolbox.com/acls-setfacl/ But, btw: root will get access in every case.

0

精彩评论

暂无评论...
验证码 换一张
取 消