LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   ownership of /var/www/html (https://www.linuxquestions.org/questions/linux-security-4/ownership-of-var-www-html-78776/)

haobaba1 08-04-2003 01:27 AM

ownership of /var/www/html
 
I was having a problem executing system calls from php. I later realized that I had out of concern for my system changed apache from running as root back to running as apache. This of course caused me problems because I was trying to modify files in the before mention directory. I then changed ownership of /var/www/html and everything in it to apache and this fixed my problem running system calls. I was wondering if what I did was correct and if there was a better way to do this.

Any comments would be appreciated.

david_ross 08-04-2003 02:58 PM

That shoulw be fine but I tend to make the file owner the human who maintains the files eg "webmaster" then if you want apache to be able to write to the files then:
chgrp apache somefile
chmod g+w somefile

This stops apache having write access to your whole site.


All times are GMT -5. The time now is 12:56 PM.