Bug 431867

Summary: public_content_rw_t does not work on samba shares
Product: Red Hat Enterprise Linux 5 Reporter: Lutz Lange <llange>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 5.1   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-07 15:56:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lutz Lange 2008-02-07 15:05:18 UTC
Description of problem:
setting public_content_rw_t on a samba share does not allow writing with smbclient.

Version-Release number of selected component (if applicable):
samba-3.0.25b-0.el5.4
selinux-policy-2.4.6-104.el5

How reproducible:
create a samba share
make it wirteable
adjust file permissons
adjust selinux context to public_content_rw_t
call smbclient //server/share
try > mkdir test

change selinux context to samba_share_t
try again -> success

Expected results:
public_content_rw_t should be writeable

Comment 1 Daniel Walsh 2008-02-07 15:56:21 UTC
You need to turn on the smbd boolean.

setsebool -P allow_smbd_anon_write 1


Comment 2 Lutz Lange 2008-02-07 17:04:06 UTC
This means i should allow annonymous writes? 
I dont write annonymously. I connect as student with password.

$ smbclient -U student //station8/share

Sorry to have been too unspecific.

I can attach my whole config, if you like.

Comment 3 Daniel Walsh 2008-02-07 17:18:13 UTC
No this boolean just allows smbd to write to files labeled public_content_rw_t.

From SELinux point of view this is anonymous.  (public_content_t) was originally
ftp_anon_t.

So you are not allowing anonymous writes from an Samba point of view, just
SELinux view of the world.

man samba_selinux has more description or

http://danwalsh.livejournal.com/14442.html