Bug 1256851 - SELinux is preventing esmtp from 'read' accesses on the file /.esmtp_queue/wyVaywGj/mail.
SELinux is preventing esmtp from 'read' accesses on the file /.esmtp_queue/wy...
Status: CLOSED DUPLICATE of bug 1303305
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
23
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
abrt_hash:c7a150d61e75db3a7a3c09a8215...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-25 11:19 EDT by Mikhail
Modified: 2016-08-11 04:06 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-11 04:06:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mikhail 2015-08-25 11:19:13 EDT
Description of problem:
SELinux is preventing esmtp from 'read' accesses on the file /.esmtp_queue/wyVaywGj/mail.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/.esmtp_queue/wyVaywGj/mail default label should be default_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /.esmtp_queue/wyVaywGj/mail

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that esmtp should be allowed read access on the mail file 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 esmtp /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:system_mail_t:s0-s0:c0.c1023
Target Context                system_u:object_r:root_t:s0
Target Objects                /.esmtp_queue/wyVaywGj/mail [ file ]
Source                        esmtp
Source Path                   esmtp
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-141.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              4.2.0-0.rc8.git0.1.fc23.x86_64+debug #1 SMP Mon
                              Aug 24 14:26:09 UTC 2015 x86_64 x86_64
Alert Count                   5
First Seen                    2015-08-25 20:18:05 YEKT
Last Seen                     2015-08-25 20:18:25 YEKT
Local ID                      cd697211-d972-4590-b373-61a45501a981

Raw Audit Messages
type=AVC msg=audit(1440515905.740:877): avc:  denied  { read } for  pid=4299 comm="esmtp" path="/.esmtp_queue/wyVaywGj/mail" dev="sda1" ino=3554908 scontext=system_u:system_r:system_mail_t:s0-s0:c0.c1023 tcontext=system_u:object_r:root_t:s0 tclass=file permissive=0


Hash: esmtp,system_mail_t,root_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-141.fc23.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.2.0-0.rc8.git0.1.fc23.x86_64+debug
type:           libreport

Potential duplicate: bug 1140493
Comment 1 Ondřej Lysoněk 2016-08-11 04:06:16 EDT
The main issue here is that the '.esmtp_queue directory' should not be under '/' but under some home directory. This happens when sendmail doesn't have the $HOME environment variable set, e.g. when running from a cron job. This problem is being resolved in [1]. Marking as duplicate.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1303305

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

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