Share your knowledge at the LQ Wiki.
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 01-28-2004, 01:23 PM   #1
LQ Newbie
Registered: Jan 2004
Posts: 17

Rep: Reputation: 0
Angry Red Hat 9 / running webserver but can't use /var/www/html/


I am currently teaching myself how to run a webserver (not that I am planning on doing it any time soon, though) and I am having problems with the Security Policy.

Okay, we have a root profile, by default.
Then, there is the "other" profile, which is for common tasks.

So, the root profile has access to everything, so I can create documents in every area available with that profile. However, the "other" profile does not have access to all those other folders and files, and can only create documents in its own "home" directory. So, here is the question:

If I am supposed to use "/var/www/html/" as the folder for my webpages, how can create a profile which will have both the ability to save pages in that folder, and yet the pages will not be inaccessible by apache?

The thing is, every page I create with the root profile, is restricted to only the root profile. I can modify the permissions on the page, but I would have to do it with every page that I create -- and that is pretty much counter productive.

So, anyone out there who is experienced in this kind of situations? Anyone who can point me in the right direction as to what I need to do to make my work easier?

Any and all help is appreciated!
Old 01-28-2004, 06:09 PM   #2
Registered: Aug 2003
Location: Arizona
Distribution: Gentoo
Posts: 142

Rep: Reputation: 15
There are a few things you can do.
1) move the files to the *others* directory as /home/other/www and update apache so that it uses that directory to serve the pages.
2) make a new group (I'll call it htmlgroup for now) and chown the html directory to be owned by root and belong to the htmlgroup. So it would be chown root:htmlgroup /var/www/html. Now change the permissions on the html directory to 775 and add the *other* user to the group. Now you can write files there as the other user, but you'll have to chown the old files to be able to edit them as that user.


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
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
ownership of /var/www/html haobaba1 Linux - Security 1 08-04-2003 02:58 PM
Allow Users FTP access to /var/www in Red hat 7.2 dsolecki Linux - General 6 02-04-2003 01:12 AM
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 10:33 AM.

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