LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 08-04-2003, 01:27 AM   #1
haobaba1
Member
 
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
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

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


Reply


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


All times are GMT -5. The time now is 07:11 PM.

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