selinux and per-user web directories

Arthur Pemberton pemboa at gmail.com
Mon Apr 20 21:52:52 UTC 2009


On Mon, Apr 20, 2009 at 4:22 PM, anonymous <bitskrieg at gmail.com> wrote:
> Hi,
>
> I wanted to create my own web directory to serve pages from for obvious
> reasons.
> I edited the httpd.conf file appropriately using the UserDir defaults.
> I then changed the permissions on my home folder (chmod 711) and then on my
> web directory as root (chmod 755).
> On most distros this is more than enough, on Fedora I had to deal with
> SELinux.
>
> I used the system-config-selinux command as root to enable all the apache
> restrictions and some others as well.
> Thanks due to this website:
> http://optics.csufresno.edu/~kriehn/fedora/fedora_files/f9/howto/selinux.html
>
> SELinux still prevented the apache from serving from the directory.
> I then used the command:
> # chcon -R -h -t httpd_sys_content_t  my_web_dir
>
> And finally, I could serve pages alongside SELinux.
>
> However, I've run into a strange problem.
>
> http://localhost/~user/ OKAY
> http://localhost/~user/newdirX OKAY
> http://localhost/~user/newdirX/newdirY NOT OKAY
>
> The newdirY is hidden.
> Is there some directory depth restriction used by apache?
> I don't think this is an SELinux problem because no warning is issued, I
> might be wrong.
>
> I'd like to be able to create limitless directories in my webdir and have
> their contents served without issue.


Have you checked the apache logs?



-- 
Fedora 9 : sulphur is good for the skin
( www.pembo13.com )




More information about the fedora-list mailing list