Bug 734423 - SELinux is preventing /usr/bin/python from 'read' accesses on the lnk_file /var/www/html.
Summary: SELinux is preventing /usr/bin/python from 'read' accesses on the lnk_file /v...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:6058b956b6d...
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-30 11:15 UTC by eric
Modified: 2011-10-07 15:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-10-07 15:03:08 UTC

Attachments (Terms of Use)

Description eric 2011-08-30 11:15:52 UTC
SELinux is preventing /usr/bin/python from 'read' accesses on the lnk_file /var/www/html.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that python should be allowed read access on the html lnk_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep fail2ban-client /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:fail2ban_client_t:s0
Target Context                system_u:object_r:httpd_sys_content_t:s0
Target Objects                /var/www/html [ lnk_file ]
Source                        fail2ban-client
Source Path                   /usr/bin/python
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7.1-7.fc15
Target RPM Packages           httpd-2.2.19-2.fc15
Policy RPM                    selinux-policy-3.9.16-35.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux localhost.localdomain
                              #1 SMP Tue Aug 16 04:10:59 UTC 2011 x86_64 x86_64
Alert Count                   5
First Seen                    Tue 26 Jul 2011 06:35:25 AM EDT
Last Seen                     Tue 30 Aug 2011 07:11:47 AM EDT
Local ID                      b463cc62-c80d-410a-8e36-f5492f3f38ed

Raw Audit Messages
type=AVC msg=audit(1314702707.881:51): avc:  denied  { read } for  pid=2195 comm="fail2ban-client" name="html" dev=dm-2 ino=10356107 scontext=system_u:system_r:fail2ban_client_t:s0 tcontext=system_u:object_r:httpd_sys_content_t:s0 tclass=lnk_file

type=SYSCALL msg=audit(1314702707.881:51): arch=x86_64 syscall=lstat success=no exit=ENOENT a0=1104650 a1=7fffb8701dd0 a2=7fffb8701dd0 a3=6d74682f items=0 ppid=2188 pid=2195 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(removed) ses=4294967295 comm=fail2ban-client exe=/usr/bin/python subj=system_u:system_r:fail2ban_client_t:s0 key=(null)

Hash: fail2ban-client,fail2ban_client_t,httpd_sys_content_t,lnk_file,read


#============= fail2ban_client_t ==============
allow fail2ban_client_t httpd_sys_content_t:lnk_file read;

audit2allow -R

#============= fail2ban_client_t ==============
allow fail2ban_client_t httpd_sys_content_t:lnk_file read;

Comment 1 Daniel Walsh 2011-08-30 16:02:51 UTC
This looks like you did local customization

/var/www/html is not a link on a normal system.

Note You need to log in before you can comment on or make changes to this bug.