Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 08-04-2003, 01:27 AM   #1
Registered: Jul 2003
Location: VA Tech
Distribution: Mandrake 9.1
Posts: 73

Rep: Reputation: 15
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.
Old 08-04-2003, 02:58 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
apache 403 for dir in /var/www/html/ m3rajk Linux - Networking 7 10-11-2005 01:31 PM
help in /var/www/html/!! chidomen Linux - Newbie 4 01-13-2005 11:02 AM
Can't save files to /var/www/html/ Panopticon Linux - Newbie 14 09-12-2003 02:03 AM
should var/www/html be accessible to root only? linuxfond Linux - Newbie 1 09-06-2003 02:00 PM
chmod of /var/www/html alTereD Linux - Security 1 12-16-2002 02:43 PM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:48 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration