Page 1 of 1

Help with SELinux public_html (access denied)

Posted: 2008/11/13 17:33:46
by grifs71
I have tried relabeling the file context with the file context of a file that works, however I still receive the following error:

Nov 13 11:16:02 blade3 kernel: audit(1226596562.377:704): avc: denied { getattr } for pid=29913 comm="httpd" name="public_html" dev=dm-0 ino=1328790 scontext=root:system_r:httpd_t tcontext=root:object_r:user_home_t tclass=dir

It is on public_html

Contexts that works root:object_r:httpd_sys_content_t

I have tried to do the following chcon -t httpd_sys_content_t public_html however I still get access denied?

drwxr-xr-x user user root:object_r:httpd_sys_content_t public_html

Has anyone had this issue before?

Any help would be greatly appreciated.

Re: Help with SELinux public_html (access denied) SOLVED

Posted: 2008/11/13 21:54:43
by grifs71
Solution to problem

chcon --reference /var/www/html /home/user/html (ect) [source from where you want the context to match]

chcon -t httpd_sys_content_t to the /home/user/html [change the context on the files]

This resolves the issue.

If anyone needs any more information or explanation let me know...


Re: Help with SELinux public_html (access denied)

Posted: 2008/11/17 09:47:22
by tru_tru
chcon -R -t httpd_user_content_t public_html/ from