Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-27-2004, 04:11 PM
|
#1
|
LQ Newbie
Registered: Mar 2004
Distribution: Red Hat
Posts: 10
Rep:
|
apache root directory
Hi gang, I'm using an older version of Red Had, and am hoping to set it up as a basic webserver. The root directory apache uses for it's docs, is /var/www/html wich is owned by root, group root. I created a new group called 'web', and added a few users to it. I then did a chgrp on the html folder so users can read/write to that folder. That worked fine for the read/write, but now I'm getting a 403 forbidden error when I access the webserver through a browser.
Do these files need to have a certain permission set to be visible? Any suggestions?
Thanks for any help.
-Jeff
|
|
|
07-27-2004, 04:31 PM
|
#2
|
Member
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Red Hat, openBSD,Mandrake,freeBSD,SunOS
Posts: 168
Rep:
|
Apache has to be able to see them as well. You changed the group and Apache does not belong to that root.
|
|
|
07-27-2004, 04:48 PM
|
#3
|
LQ Newbie
Registered: Mar 2004
Distribution: Red Hat
Posts: 10
Original Poster
Rep:
|
That makes sense, but I still can't re-configure it. The html folder is still owned by root, with goup web. I understand that there is a user 'apache'. I added this user to the web group. It still won't work. I also notice that there is a group named apache. Should I just change everything back to owner and group root?
Any advice to repair this? If not, does anyone know a tutorial that describes giving users access to these documents, without root access?
Thanks for the help.
-Gooch
|
|
|
07-27-2004, 04:54 PM
|
#4
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
On a lot of configurations, Apache doesn't actually run with the priviliges of the groups the apache user is a member of (this is for security, I imagine). The best thing to do is make sure that your /var/www/html directory is world readable and world executable. Also all files in it should be world readable. Make sure /var/www is world readable and executable too. This should fix your issues.
Alternatively, if you want Apache to run with the priviliges of a particular group, open your httpd.conf file and find the line saying User apache (or whoever your Apache user is). Directly below this add a line saying "Group web", and restart Apache. This will allow Apache to run as group web.
|
|
|
07-27-2004, 07:18 PM
|
#5
|
Member
Registered: Jul 2004
Location: Chennai, India
Posts: 952
|
Same problem with RedHat 7.1 and Apache (off the distro - dont remeber the number right now). Had to make permission of the folder (/var/www/html/myfolder) as +x and fortunately for me, it's a hardened intranet with only dial up internet access thru' a DOS client. (It may not work for everyone and one day I will have to change the permission to 444).
End
|
|
|
07-28-2004, 11:50 AM
|
#6
|
LQ Newbie
Registered: Mar 2004
Distribution: Red Hat
Posts: 10
Original Poster
Rep:
|
Thanks for the suggestions. I was able to get it back exactly how it was before I changed anything. Apache is happy again, and is working fine.
Before I make any more changes, let me get this straight. It is OK to change the HTML folder to group = web, as long as I add "group web" in the appache httpd.conf as BTMILLER suggested. Is this correct?
|
|
|
All times are GMT -5. The time now is 09:57 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|