Bug 6042 - Misinterpreted create mode with POSIX acls
Summary: Misinterpreted create mode with POSIX acls
Status: RESOLVED DUPLICATE of bug 10792
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.2.5
Hardware: x86 Linux
: P3 normal
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL: http://bugs.debian.org/cgi-bin/bugrep...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-16 02:17 UTC by Fedor Piecka
Modified: 2014-09-04 12:34 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fedor Piecka 2009-01-16 02:17:44 UTC
It's not possible to force samba to correctly map default ACL entries to new files. It does no difference when creating a new file and a new directory. The execute bits on a new file are always set.

Example:


relevant part of smb.conf
[sambatest]
   comment = sambatest
   path = /srv/sambatest
   public = no
   writable = yes
   read only = No
   inherit acls = yes
   store dos attributes = yes
   map archive = no
   map system = no
   map hidden = no
   map readonly = no
   wide links = no
   map acl inherit = yes




$ getfacl test/
# file: test/
# owner: root
# group: root
user::rwx
user:test:rwx
group::rwx
mask::rwx
other::---
default:user::rwx
default:group::rwx
default:mask::rwx
default:other::rwx

$ touch test/linuxfile
$ getfacl test/linuxfile 
# file: test/linuxfile
# owner: root
# group: root
user::rw-
group::rwx			#effective:rw-
mask::rw-
other::rw-

$ getfacl test/windowsfile.txt            #file created from windows
# file: test/windowsfile.txt
# owner: test
# group: test
user::rwx
group::rwx
mask::rwx
other::rwx

$ mkdir test/linuxdir
$ getfacl test/linuxdir/
# file: test/linuxdir/
# owner: root
# group: root
user::rwx
group::rwx
mask::rwx
other::rwx
default:user::rwx
default:group::rwx
default:mask::rwx
default:other::rwx

$ getfacl test/windowsdir/                  3dir created from windows
# file: test/windowsdir/
# owner: test
# group: test
user::rwx
group::rwx
mask::rwx
other::rwx
default:user::rwx
default:group::rwx
default:mask::rwx
default:other::rwx





After setting inherit acls = no:


$ getfacl test/windowsfile.txt 
# file: test/windowsfile.txt
# owner: test
# group: test
user::rw-
group::rwx
mask::rwx
other::r--

$ getfacl test/windowsdir/
# file: test/windowsdir/
# owner: test
# group: test
user::rwx
group::r-x
mask::rwx
other::r-x
default:user::rwx
default:group::rwx
default:mask::rwx
default:other::rwx



Setting create mask, mode, security mode etc. does not help for other acls than standard user, group and other.

The above example means directories are OK, but file ACLs are not correctly set.

Bug is also submitted to Debian bugtracking system as #410048.
Comment 1 Paul Barker 2012-08-28 13:14:18 UTC
This bug appears to be a duplicate of bug 8332 and is a problem I am also experiencing. I have posted my comments on that bug as it is the more recent.
Comment 2 Björn Jacke 2014-09-04 12:34:35 UTC

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