Bug 1588212

Summary: SELinux is preventing mktemp from 'write' accesses on the directory .esmtp_queue.
Product: [Fedora] Fedora Reporter: henoc <hcarpio02>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dwalsh, lvrabec, mgrepl, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:5832a50aa26db5c4ff99800a8c8d73f708f62ec83f9e587734d6e0aede2d746b;
Fixed In Version: selinux-policy-3.13.1-284.37.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-08 15:33:11 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 henoc 2018-06-07 00:01:50 UTC
Description of problem:
SELinux is preventing mktemp from 'write' accesses on the directory .esmtp_queue.

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

If you believe that mktemp should be allowed write access on the .esmtp_queue 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 'mktemp' --raw | audit2allow -M my-mktemp
# semodule -X 300 -i my-mktemp.pp

Additional Information:
Source Context                system_u:system_r:fsdaemon_t:s0
Target Context                system_u:object_r:mail_home_rw_t:s0
Target Objects                .esmtp_queue [ dir ]
Source                        mktemp
Source Path                   mktemp
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.34.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.16.11-200.fc27.x86_64 #1 SMP Tue
                              May 22 18:36:25 UTC 2018 x86_64 x86_64
Alert Count                   69
First Seen                    2018-02-21 07:30:24 AST
Last Seen                     2018-06-06 19:30:13 AST
Local ID                      ba93be75-2d82-47fc-93dc-566baec1f892

Raw Audit Messages
type=AVC msg=audit(1528327813.102:240): avc:  denied  { write } for  pid=5450 comm="dotlockfile" name=".esmtp_queue" dev="sda2" ino=1704996 scontext=system_u:system_r:fsdaemon_t:s0 tcontext=system_u:object_r:mail_home_rw_t:s0 tclass=dir permissive=1


Hash: mktemp,fsdaemon_t,mail_home_rw_t,dir,write

Version-Release number of selected component:
selinux-policy-3.13.1-283.34.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.16.11-200.fc27.x86_64
type:           libreport

Potential duplicate: bug 1427357

Comment 1 Fedora Update System 2018-07-27 09:21:30 UTC
selinux-policy-3.13.1-284.37.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-4bb4de2d86

Comment 2 Fedora Update System 2018-07-27 15:38:29 UTC
selinux-policy-3.13.1-284.37.fc27 has been pushed to the Fedora 27 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-2018-4bb4de2d86

Comment 3 Fedora Update System 2018-08-08 15:33:11 UTC
selinux-policy-3.13.1-284.37.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.