I am seeing some weird permissions issues with samba 4 that I don't understand.
I have an XFS partition mounted on /storage/test-xfs
, shared with a basic section:
# /storage/test-xfs is a mount of /dev/mapper/storage-text-xfs
[public]
path = /storage/test-xfs
comment = bla bla
When accessing this from smbclient //localhost/public
, I get access denied message when doing a simple ls
. Now, if I instead "export" a subdirectory of the filesystem, say /storage/test-xfs/foo
:
[public]
path = /storage/test-xfs/foo
comment = bla bla
That works. I am not sure I understand why, but maybe sharing the "root" of a fs is not possible.
Now, for the really weird aspect. If I create another directory /storage/test-xfs/bar
with mkdir
, with the same owner/group and exactly same permissions, and export it with
[public-bar]
path = /storage/test-xfs/bar
comment = bla bla
I get permissions denied when doing ls in smbclient //localhost/public-bar
. I thought maybe it was ACL, so I made sure that the output of getfacl
for both test-xfs/foo
and test-xfs/bar
are exactly the same, but still the same error from smbclient. If instead of creating the directory test-xfs/bar
with mkdir
, I actually copy with cp -a foo bar
, then I can do ls
successfully. It is as if there is something besides Unix and ACL permissions that control access, but I cannot figure out what it is.
Any idea/pointer on what is going on ?
I am using samba 4.7.1 from Centos 7.4, the OS is up to date.