Bug 1282043 - SELinux is preventing esmtp from 'read' accesses on the file /root/.esmtp_queue/csudEFmV/mail.
SELinux is preventing esmtp from 'read' accesses on the file /root/.esmtp_que...
Status: CLOSED DUPLICATE of bug 1366173
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
low Severity low
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-11-14 09:14 EST by Marco Guazzone
Modified: 2016-08-11 05:54 EDT (History)
18 users (show)

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

Attachments (Terms of Use)

  None (edit)
Description Marco Guazzone 2015-11-14 09:14:31 EST
Description of problem:
SELinux is preventing esmtp from 'read' accesses on the file /root/.esmtp_queue/csudEFmV/mail.

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

If you want to fix the label. 
/root/.esmtp_queue/csudEFmV/mail default label should be mail_home_rw_t.
Then you can run restorecon.
# /sbin/restorecon -v /root/.esmtp_queue/csudEFmV/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.
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:admin_home_t:s0
Target Objects                /root/.esmtp_queue/csudEFmV/mail [ file ]
Source                        esmtp
Source Path                   esmtp
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-154.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.5-300.fc23.x86_64+debug #1 SMP
                              Tue Oct 27 04:11:34 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-11-14 15:00:07 CET
Last Seen                     2015-11-14 15:00:07 CET
Local ID                      38b8f6b4-e2f7-406e-b066-7e7fcb362965

Raw Audit Messages
type=AVC msg=audit(1447509607.310:595): avc:  denied  { read } for  pid=32110 comm="esmtp" path="/root/.esmtp_queue/csudEFmV/mail" dev="sda6" ino=420351 scontext=system_u:system_r:system_mail_t:s0-s0:c0.c1023 tcontext=system_u:object_r:admin_home_t:s0 tclass=file permissive=0

Hash: esmtp,system_mail_t,admin_home_t,file,read

Version-Release number of selected component:

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.5-300.fc23.x86_64+debug
type:           libreport

Potential duplicate: bug 828094
Comment 1 Miroslav Grepl 2015-11-20 07:57:34 EST
Could you please execute

# restorecon -Rv /root/.esmtp_queue

to fix this issue. The problem is how /root/.esmtp_queue was created. Did you create it by hand?
Comment 2 Marco Guazzone 2015-11-22 05:19:24 EST
O(In reply to Miroslav Grepl from comment #1)
> Could you please execute
> # restorecon -Rv /root/.esmtp_queue
OK, done.

> to fix this issue. The problem is how /root/.esmtp_queue was created. Did
> you create it by hand?

No. I have no idea which program created this directory.
However, digging inside that dir I saw a lot of email messages from:
- freshclam (from package: clamav-update-0.98.7-3.fc23.x86_64)
- rkhunter (from package: rkhunter-1.4.2-8.fc23.noarch)

So, I suspect that one of the above apps created this directory.


Comment 3 Reinout van Schouwen 2016-03-09 07:35:13 EST
Description of problem:
I just got an selinux alert.

Version-Release number of selected component:

Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.4.2-301.fc23.x86_64
type:           libreport
Comment 4 Reinout van Schouwen 2016-03-09 07:37:00 EST
I've also ran into this and installed freshclam.
Comment 5 Lukas Vrabec 2016-08-11 05:54:08 EDT

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

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