View Issue Details

IDProjectCategoryView StatusLast Update
0016129CentOS-7selinux-policypublic2019-05-30 11:18
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionwon't fix 
PlatformOSOS Version7
Product Version 
Target VersionFixed in Version 
Summary0016129: SELinux is preventing /usr/sbin/smbd from 'create' accesses on the file smbd.log.
DescriptionDescription of problem:
Fresh install of CENTOS 7.

SELINUX is having a fit when Samba attempts to create log files.
SELinux is preventing /usr/sbin/smbd from 'create' accesses on the file smbd.log.

***** Plugin samba_share (75.5 confidence) suggests ***********************

If you want to allow smbd to have create access on the smbd.log file
Then you need to change the label on 'smbd.log'
# semanage fcontext -a -t samba_share_t 'smbd.log'
# restorecon -v 'smbd.log'

***** Plugin catchall_boolean (12.2 confidence) suggests ******************

If you want to allow daemons to dump core
Then you must tell SELinux about this by enabling the 'daemons_dump_core' boolean.

setsebool -P daemons_dump_core 1

***** Plugin catchall_boolean (12.2 confidence) suggests ******************

If you want to allow samba to export all rw
Then you must tell SELinux about this by enabling the 'samba_export_all_rw' boolean.

setsebool -P samba_export_all_rw 1

***** Plugin catchall (1.97 confidence) suggests **************************

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

Additional Information:
Source Context system_u:system_r:smbd_t:s0
Target Context system_u:object_r:root_t:s0
Target Objects smbd.log [ file ]
Source smbd
Source Path /usr/sbin/smbd
Port <Unknown>
Host (removed)
Source RPM Packages samba-4.8.3-4.el7.x86_64
Target RPM Packages
Policy RPM selinux-policy-3.13.1-229.el7_6.12.noarch
Selinux Enabled True
Policy Type targeted
Enforcing Mode Permissive
Host Name (removed)
Platform Linux (removed) 3.10.0-957.12.2.el7.x86_64 #1 SMP
                              Tue May 14 21:24:32 UTC 2019 x86_64 x86_64
Alert Count 1
First Seen 2019-05-30 05:07:09 MDT
Last Seen 2019-05-30 05:07:09 MDT
Local ID 99335ae3-740b-46a2-b36f-793e3719b024

Raw Audit Messages
type=AVC msg=audit(1559214429.193:179): avc: denied { create } for pid=8055 comm="smbd" name="smbd.log" scontext=system_u:system_r:smbd_t:s0 tcontext=system_u:object_r:root_t:s0 tclass=file permissive=1

type=AVC msg=audit(1559214429.193:179): avc: denied { append open } for pid=8055 comm="smbd" path="/smbd.log" dev="dm-0" ino=3197801 scontext=system_u:system_r:smbd_t:s0 tcontext=system_u:object_r:root_t:s0 tclass=file permissive=1

type=SYSCALL msg=audit(1559214429.193:179): arch=x86_64 syscall=open success=yes exit=EBADF a0=557cad6d9db0 a1=441 a2=1a4 a3=1 items=0 ppid=1 pid=8055 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=smbd exe=/usr/sbin/smbd subj=system_u:system_r:smbd_t:s0 key=(null)

Hash: smbd,smbd_t,root_t,file,create

Version-Release number of selected component:
Additional Informationreporter: libreport-
hashmarkername: setroubleshoot
kernel: 3.10.0-957.12.2.el7.x86_64
reproducible: Not sure how to reproduce the problem
type: libreport
TagsNo tags attached.




2019-05-30 11:18

manager   ~0034544

This is not a bug. Your smbd.log is mislabelled and should not be system_u:object_r:root_t:s0 unless it's located under /root in which case, it's in the wrong place and you should amend your config to write it under /var/log/samba not under /root. If the file is under /var/log/samba now then run restorecon -RFv /var/log/samba to correct it.

Issue History

Date Modified Username Field Change
2019-05-30 11:14 abundanthill New Issue
2019-05-30 11:18 TrevorH Status new => closed
2019-05-30 11:18 TrevorH Resolution open => won't fix
2019-05-30 11:18 TrevorH Note Added: 0034544