Re: How gain access to DocumentRoot contents of Apache-httpd through a Web browser which is set to point to the Home folder of the User?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/14/2011 11:06 AM, Bryn M. Reeves wrote:
> On 04/14/2011 10:39 AM, Varuna Seneviratna wrote:
>> When I try to Access the DocumentRoot which is /home/<User
>> Name>/public_html by typing http://localhost I get a 403 Forbidden
>> Page.What should I do gain Access to DocumentRoot Contents?
> 
> If you're getting a 403 then something is denying the web server access to those
> paths. If you have set the directory permissions correctly (iirc you need other
> execute on the home directory (search permission) and other read/execute on the
> public_html directory and its subdirectories) the you may need to set up SELinux
> contexts for the directory if you have it enabled on your system.
> 
> I normally do this by using a reference from /var/www/html since it is installed
> with the correct context for httpd content:
> 
> chcon -R --reference=/var/www/html public_html/

Heh, thought I might be out of date here.. I think that the correct context for
home directory web content is now httpd_user_content_t (although I think
httpd_sys_content_t still works - an SELinux expert can probably explain exactly
why that's wrong or a bad idea but it certainly means there's no separation
between user and system content so the policy can't distinguish them ;).

More info in this bug:

https://bugzilla.redhat.com/show_bug.cgi?id=509943

Regards,
Bryn.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux