Can File system ACL's help me keep php scripts away from other users
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.
精彩评论