Bug 1362685 - SELinux is preventing esmtp from 'read' accesses on the file /.esmtp_queue/1YGGDimx/mail.
Summary: SELinux is preventing esmtp from 'read' accesses on the file /.esmtp_queue/1Y...
Keywords:
Status: CLOSED DUPLICATE of bug 1303305
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 24
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c7a150d61e75db3a7a3c09a8215...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-02 20:59 UTC by John Williams
Modified: 2016-08-11 08:08 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-11 08:08:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Williams 2016-08-02 20:59:22 UTC
Description of problem:
SELinux is preventing esmtp from 'read' accesses on the file /.esmtp_queue/1YGGDimx/mail.

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

If you want to fix the label. 
/.esmtp_queue/1YGGDimx/mail default label should be default_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /.esmtp_queue/1YGGDimx/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:
# ausearch -c 'esmtp' --raw | audit2allow -M my-esmtp
# semodule -X 300 -i my-esmtp.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/1YGGDimx/mail [ file ]
Source                        esmtp
Source Path                   esmtp
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-191.5.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.6.3-300.fc24.x86_64 #1 SMP Fri
                              Jun 24 20:52:41 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-07-23 09:10:06 NZST
Last Seen                     2016-07-23 09:10:06 NZST
Local ID                      90f79bab-1047-429f-9dbf-db9a44cdf463

Raw Audit Messages
type=AVC msg=audit(1469221806.253:485): avc:  denied  { read } for  pid=27851 comm="esmtp" path="/.esmtp_queue/1YGGDimx/mail" dev="sdb5" ino=1704393 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-191.5.fc24.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.6.4-301.fc24.x86_64
type:           libreport

Potential duplicate: bug 1256851

Comment 1 Ondřej Lysoněk 2016-08-11 08:08:51 UTC
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.