Bug 456674 - Selinux does not allow samba to change file owner
Summary: Selinux does not allow samba to change file owner
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy-targeted
Version: 5.2
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2008-07-25 14:24 UTC by Ales Zelinka
Modified: 2009-01-20 21:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-01-20 21:30:23 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0163 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2009-01-20 16:05:21 UTC

Description Ales Zelinka 2008-07-25 14:24:29 UTC
Description of problem:

Selinux does not allow samba to change file owner of a shared file .

Version-Release number of selected component (if applicable):

How reproducible:


Steps to Reproduce:
1.setup samba server, share some files (selinux context root:object_r:samba_share_t)
2.add root to samba user db
3.try to change file ownership of some file: 
smbcacls //localhost/share some-file -Uroot%root-samba-password -C the-new-owner
Actual results:
smbcacls fails with these error messages:
ERROR: secdesc set failed: NT_STATUS_ACCESS_DENIED

selinux logs
type=AVC msg=audit(1216995236.905:47291): avc:  denied  { chown } for  pid=9278
comm="smbd" capability=0 scontext=root:system_r:smbd_t:s0
tcontext=root:system_r:smbd_t:s0 tclass=capability
type=SYSCALL msg=audit(1216995236.905:47291): arch=14 syscall=181 success=no
exit=-1 a0=8511300 a1=343d a2=ffffffff a3=ffffffff items=0 ppid=8823 pid=9278
auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none)
ses=7736 comm="smbd" exe="/usr/sbin/smbd" subj=root:system_r:smbd_t:s0 key=(null)

owner of some-file stays the same

Expected results:
- changed owner of some-file
- no NT_* errors from smbcacls
- no denial from selinux

Comment 1 Daniel Walsh 2008-07-29 19:54:35 UTC
Fixed in selinux-policy-2.4.6-143.el5 

Comment 2 RHEL Program Management 2008-07-29 20:15:57 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 9 errata-xmlrpc 2009-01-20 21:30:23 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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