Bug 1072012 - SELinux is preventing /usr/bin/python2.7 from 'add_name' accesses on the directory .
Summary: SELinux is preventing /usr/bin/python2.7 from 'add_name' accesses on the dire...
Keywords:
Status: CLOSED DUPLICATE of bug 1072015
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:10ea34b09b237bf56063e1202d2...
: 1072010 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-03 16:47 UTC by Chester Knapp
Modified: 2014-07-21 04:26 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-03-10 09:31:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: packstack-answers-20140303-103051.txt (14.51 KB, text/plain)
2014-03-03 16:47 UTC, Chester Knapp
no flags Details

Description Chester Knapp 2014-03-03 16:47:45 UTC
Description of problem:
Happened during RDO installation. 
SELinux is preventing /usr/bin/python2.7 from 'add_name' accesses on the directory .

*****  Plugin file (36.8 confidence) suggests   ******************************

If you think this is caused by a badly mislabeled machine.
Then you need to fully relabel.
Do
touch /.autorelabel; reboot

*****  Plugin file (36.8 confidence) suggests   ******************************

If you think this is caused by a badly mislabeled machine.
Then you need to fully relabel.
Do
touch /.autorelabel; reboot

*****  Plugin catchall_labels (23.2 confidence) suggests   *******************

If you want to allow python2.7 to have add_name access on the  directory
Then you need to change the label on $FIX_TARGET_PATH
Do
# semanage fcontext -a -t FILE_TYPE '$FIX_TARGET_PATH'
where FILE_TYPE is one of the following: swift_data_t, swift_var_cache_t, swift_var_run_t, var_run_t, var_t. 
Then execute: 
restorecon -v '$FIX_TARGET_PATH'


*****  Plugin catchall (5.04 confidence) suggests   **************************

If you believe that python2.7 should be allowed add_name access on the  directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep swift-object-re /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:swift_t:s0
Target Context                system_u:object_r:file_t:s0
Target Objects                 [ dir ]
Source                        swift-object-re
Source Path                   /usr/bin/python2.7
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7.5-11.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-122.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.13.5-200.fc20.x86_64 #1 SMP Mon
                              Feb 24 16:51:35 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-03-03 11:44:53 EST
Last Seen                     2014-03-03 11:44:53 EST
Local ID                      eb9ae9d3-4fcc-4582-938c-3900ac4cc27d

Raw Audit Messages
type=AVC msg=audit(1393865093.985:17084): avc:  denied  { add_name } for  pid=29179 comm="swift-object-re" name="objects" scontext=system_u:system_r:swift_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir


type=SYSCALL msg=audit(1393865093.985:17084): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=197ef00 a1=1ff a2=3dd67bff88 a3=0 items=0 ppid=1 pid=29179 auid=4294967295 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 egid=1001 sgid=1001 fsgid=1001 ses=4294967295 tty=(none) comm=swift-object-re exe=/usr/bin/python2.7 subj=system_u:system_r:swift_t:s0 key=(null)

Hash: swift-object-re,swift_t,file_t,dir,add_name

Additional info:
reporter:       libreport-2.1.12
hashmarkername: setroubleshoot
kernel:         3.13.5-200.fc20.x86_64
type:           libreport

Comment 1 Chester Knapp 2014-03-03 16:47:48 UTC
Created attachment 870041 [details]
File: packstack-answers-20140303-103051.txt

Comment 2 Miroslav Grepl 2014-03-04 17:15:57 UTC
*** Bug 1072010 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2014-03-04 17:17:02 UTC
Where is "objects" located?

You will need to fix labeling using restorecon?

Comment 4 Daniel Walsh 2014-03-07 22:28:38 UTC
This looks like you have a disk without labels.

Comment 5 Miroslav Grepl 2014-03-10 09:31:40 UTC

*** This bug has been marked as a duplicate of bug 1072015 ***

Comment 6 Chester Knapp 2014-06-16 13:01:47 UTC
Clearing needinfo since this is closed.


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