All pastes #820925 Raw Edit

Stuff

public text v1 · immutable
·published 2007-12-17 20:41 UTC
rendered paste body
Summary
    SELinux is preventing httpd (httpd_t) "getattr" to
    /home/rohan/public_html/index.html (user_home_t).

Detailed Description
    SELinux denied access requested by httpd. /home/rohan/public_html/index.html
    may be a mislabeled.  /home/rohan/public_html/index.html default SELinux
    type is <B>httpd_user_content_t</B>, while its current type is
    <B>user_home_t</B>. Changing this file back to the default type, may fix
    your problem. File contexts can get assigned to a file can following ways.
    <ul> <li>Files created in a directory recieve the file context of the parent
    directory by default. <li>Users can change the file context on a file using
    tools like chcon, or restorecon. <li>The kernel can decide via policy that
    an application running as context A Creating a file in a directory labeled B
    will create files labeled C. </ul> This file could have been mislabeled
    either by user error, or if an normally confined application was run under
    the wrong domain. Of course this could also indicate a bug in SELinux, in
    that the file should not be labeled with this type.  If you believe this is
    a bug, please file a http://bugzilla.redhat.com/bugzilla/enter_bug.cgi
    against this package.

Allowing Access
    You can restore the default system context to this file by executing the
    restorecon command.  restorecon /home/rohan/public_html/index.html, if this
    file is a directory, you can recursively restore using restorecon -R
    /home/rohan/public_html/index.html.

    The following command will allow this access:
    restorecon /home/rohan/public_html/index.html

Additional Information        

Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:user_home_t:s0
Target Objects                /home/rohan/public_html/index.html [ file ]
Affected RPM Packages         
Policy RPM                    selinux-policy-3.0.8-64.fc8
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   plugins.restorecon
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain 2.6.23.8-63.fc8 #1 SMP
                              Wed Nov 21 18:51:08 EST 2007 i686 i686
Alert Count                   1
First Seen                    Tue 18 Dec 2007 02:10:12 AM IST
Last Seen                     Tue 18 Dec 2007 02:10:12 AM IST
Local ID                      754011bc-aba2-4158-bc2b-277abea7d4f9
Line Numbers                  

Raw Audit Messages            

avc: denied { getattr } for comm=httpd dev=sda5
path=/home/rohan/public_html/index.html pid=3242
scontext=system_u:system_r:httpd_t:s0 tclass=file
tcontext=system_u:object_r:user_home_t:s0