Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 599035 - SELinux is preventing Samba (/usr/sbin/smbd) "read" access to /lost+found.
SELinux is preventing Samba (/usr/sbin/smbd) "read" access to /lost+found.
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-06-02 10:54 EDT by Iyengar
Modified: 2010-06-07 10:14 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-06-07 10:14:40 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 Iyengar 2010-06-02 10:54:39 EDT

SELinux is preventing Samba (/usr/sbin/smbd) "read" access to /lost+found.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied samba access to /lost+found. If you want to share this directory
with samba it has to have a file context label of samba_share_t. If you did not
intend to use /lost+found as a samba repository it could indicate either a bug
or it could signal a intrusion attempt. Please refer to 'man samba_selinux' for
more information on setting up Samba and SELinux.

Allowing Access:

You can alter the file context by executing chcon -R -t samba_share_t
'/lost+found' You must also change the default file context files on the system
in order to preserve them even on a full relabel. "semanage fcontext -a -t
samba_share_t '/lost+found'"

Fix Command:

chcon -R -t samba_share_t '/lost+found'

Additional Information:

Source Context                system_u:system_r:smbd_t:s0
Target Context                system_u:object_r:lost_found_t:s0
Target Objects                /lost+found [ dir ]
Source                        smbd
Source Path                   /usr/sbin/smbd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           samba-3.5.3-61.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-15.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   samba_share
Host Name                     (removed)
Platform                      Linux d3ll521.s5systemsinc.com
                     #1 SMP Thu May 13 05:55:24
                              UTC 2010 i686 i686
Alert Count                   1
First Seen                    Wed 02 Jun 2010 10:39:54 AM EDT
Last Seen                     Wed 02 Jun 2010 10:39:54 AM EDT
Local ID                      4659cdd6-e6c4-4fc5-94b8-9f99b696719e
Line Numbers                  

Raw Audit Messages            

node=d3ll521.s5systemsinc.com type=AVC msg=audit(1275489594.632:21): avc:  denied  { read } for  pid=2208 comm="smbd" name="lost+found" dev=sdb5 ino=11 scontext=system_u:system_r:smbd_t:s0 tcontext=system_u:object_r:lost_found_t:s0 tclass=dir

node=d3ll521.s5systemsinc.com type=SYSCALL msg=audit(1275489594.632:21): arch=40000003 syscall=5 success=yes exit=24 a0=24a1320 a1=8000 a2=0 a3=0 items=0 ppid=1483 pid=2208 auid=4294967295 uid=0 gid=0 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=4294967295 comm="smbd" exe="/usr/sbin/smbd" subj=system_u:system_r:smbd_t:s0 key=(null)

Hash String generated from  samba_share,smbd,smbd_t,lost_found_t,dir,read
audit2allow suggests:

#============= smbd_t ==============
#!!!! This avc can be allowed using one of the these booleans:
#     samba_export_all_ro, samba_export_all_ro

allow smbd_t lost_found_t:dir read;
Comment 1 Daniel Walsh 2010-06-02 11:27:42 EDT
What file system are you trying to share?

You can set the samba_export_all_ro or samba_export_all_rw booleans.
Comment 2 Iyengar 2010-06-02 16:28:25 EDT
(In reply to comment #1)
> What file system are you trying to share?
> You can set the samba_export_all_ro or samba_export_all_rw booleans.    

It is an ext3 file system.
Comment 3 Daniel Walsh 2010-06-03 17:17:12 EDT
Not what I meant.  Are you sharing /  Or some other directory?
Comment 4 Iyengar 2010-06-06 12:48:04 EDT
(In reply to comment #3)
> Not what I meant.  Are you sharing /  Or some other directory?    

I notice this error When i try to access my home directory as well as a share drive.  Also I don't seem to have any problems accessing these folders/files.  I noticed these SELinux warnings when I logged into the server for maintenace.
Comment 5 Daniel Walsh 2010-06-07 10:14:40 EDT
You can either turn on the booleans to allow samba to share your entire disk.  Or if this is a share that is particular to samba you can label it samba_share_t.

man samba_selinux

Should give you further explanation.


Also will have some info.

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