LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Red Hat 9 / running webserver but can't use /var/www/html/ (https://www.linuxquestions.org/questions/linux-security-4/red-hat-9-running-webserver-but-cant-use-var-www-html-139674/)

novice22 01-28-2004 01:23 PM

Red Hat 9 / running webserver but can't use /var/www/html/
 
Hi,

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!

Khabi 01-28-2004 06:09 PM

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.


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