PHP, html, image file permissions?
In a typical PHP application what should the file per开发者_如何转开发missions of .php, .html and image files be? I'm using PHP5 with Apache on a Linux box.
Thanks
There is no "typical" situation imo.
In our production systems our file permissions for the entire DocumentRoot are:
-rw-rw-r-- 186 deploy deploy 677 Nov 17 11:32 template.php
They are owned by the deploy user, as that's the user we use to deploy our application in our production environment. They are group writable so that others in the deploy group (sysadmins, developers) can modify them if need be. In a shared system you would probably not have 0664 because you wouldn't want other people reading your files, and you'd probably use 0660 or 0640.
html and images should be readonly to the to web server's user
php should be read & execute
精彩评论