LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Apache file permissions (https://www.linuxquestions.org/questions/linux-security-4/apache-file-permissions-849889/)

unforkable 12-13-2010 04:19 AM

Apache file permissions
 
Hello,

What are the best file persmissions and owner for web files?

Is it root.root? or root.www-data? ....

Thanks

Noway2 12-13-2010 04:47 AM

You will typically want the files to be owned by a user, such as root, that limits the write permissions (to root only). This will help to prevent anyone from changing the files should they gain control of Apache. You can then make the files group read permissive and use a group such as www-data as Apache needs to be able to read, but not write, to the files. This would give you root.www-data. Directories, of course, need to have executable permissions.


All times are GMT -5. The time now is 03:32 PM.