Bug 1409977

Summary: SELinux is preventing mkdir from 'create' accesses on the directory tlp.
Product: [Fedora] Fedora Reporter: Shaun Assam <thebeardedhermit>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: bugzilla, dominick.grift, dwalsh, dxzlabs, lvrabec, mgrepl, plautrba, pmoore, redhat, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:c24e1fb8930b61ce4cecfd44b4fdbdf49156813274aefb8a78121c0db307729b;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.13.1-225.6.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-11 07:25:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Shaun Assam 2017-01-04 04:35:57 UTC
Description of problem:
- Used 'mkdir' command in the Terminal.
SELinux is preventing mkdir from 'create' accesses on the directory tlp.

*****  Plugin catchall_labels (83.8 confidence) suggests   *******************

If you want to allow mkdir to have create access on the tlp directory
Then you need to change the label on tlp
Do
# semanage fcontext -a -t FILE_TYPE 'tlp'
where FILE_TYPE is one of the following: sysfs_t, tlp_var_run_t.
Then execute:
restorecon -v 'tlp'


*****  Plugin catchall (17.1 confidence) suggests   **************************

If you believe that mkdir should be allowed create access on the tlp 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:
# ausearch -c 'mkdir' --raw | audit2allow -M my-mkdir
# semodule -X 300 -i my-mkdir.pp

Additional Information:
Source Context                system_u:system_r:tlp_t:s0
Target Context                system_u:object_r:var_lib_t:s0
Target Objects                tlp [ dir ]
Source                        mkdir
Source Path                   mkdir
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-225.3.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.8.15-300.fc25.x86_64 #1 SMP Thu
                              Dec 15 23:10:23 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2017-01-03 21:22:15 EST
Last Seen                     2017-01-03 21:22:15 EST
Local ID                      abee5f4e-d18f-432e-a71a-d0b47c6ecd53

Raw Audit Messages
type=AVC msg=audit(1483496535.543:258): avc:  denied  { create } for  pid=2884 comm="mkdir" name="tlp" scontext=system_u:system_r:tlp_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=dir permissive=1


Hash: mkdir,tlp_t,var_lib_t,dir,create

Version-Release number of selected component:
selinux-policy-3.13.1-225.3.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.8.15-300.fc25.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2017-01-06 14:26:59 UTC
*** Bug 1403533 has been marked as a duplicate of this bug. ***

Comment 2 Lukas Vrabec 2017-01-06 14:27:19 UTC
*** Bug 1400409 has been marked as a duplicate of this bug. ***

Comment 3 Fedora Update System 2017-01-08 22:24:25 UTC
selinux-policy-3.13.1-225.6.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-66d634473a

Comment 4 Fedora Update System 2017-01-10 03:26:51 UTC
selinux-policy-3.13.1-225.6.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-66d634473a

Comment 5 Fedora Update System 2017-01-11 07:25:01 UTC
selinux-policy-3.13.1-225.6.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.