Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
|
|
05-19-2006, 06:06 PM
|
#1
|
LQ Newbie
Registered: Aug 2004
Distribution: Ubuntu 6.10
Posts: 11
Rep:
|
Apache 403 Forbidden
I am an almost complete Linux newbie trying to set up Apache to work. Out of the box, I added an index.html to /var/www/html, and everything worked fine. However, to get vsftpd to work, I've relocated the document root to /home/web-docs and created a new index.html. Now I only get a 403 Forbidden message. However, when I go to my web site root address, I get the Apache server testing page, so I know the server is up and running.
Any suggestions are appreciated.
|
|
|
05-19-2006, 06:38 PM
|
#2
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
|
Are you running with SELinix in enforcing (getenforce will tell you)? If so, then you need to set the correct attributes on the document root and files:
Code:
chcon -R system_u:object_r:httpd_sys_content_t /home/web-docs
|
|
|
05-19-2006, 11:01 PM
|
#3
|
LQ Newbie
Registered: Aug 2004
Distribution: Ubuntu 6.10
Posts: 11
Original Poster
Rep:
|
Hi macemoneta. Thanks for your help. If I create the cgi, etc. folders in /home/web-docs, will I need to run this command again? Thanks in advance.
|
|
|
05-20-2006, 12:12 AM
|
#4
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
|
The subdirectories and files created in the directory after the chcon will inherit the type attribute. You can see this with the "-Z' option of ls. For example:
ls -dZ /home/web-docs
ls -Z /home/web-docs/somefile
The default locations are set to the correct context when the packages are installed. If you relocate them, you need to note the original context and apply it to the new location. It's pretty much a one-time thing at the time the directory/file is created. This is how SELinux knows what functions are permitted on a file or directory.
There's a good document here.
|
|
|
All times are GMT -5. The time now is 08:56 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
|
|