Behaviour mismatch between "store dos attributes" and "map archive" from man smb.conf(5)
Anoop C S
anoopcs at cryptolab.net
Wed May 13 11:12:30 UTC 2020
Hi,
Following is a question I have regarding the interaction between two
smb.conf parameters mentioned in the $subject. It can very well be a
misunderstanding from my side.
We have both "store dos attributes" and "map archive" set to 'yes' for
default install. But according to its description man smb.conf(5):
store dos attributes (S)
. . .When this parameter is set it will override the parameters map
hidden, map system, map archive and map readonly and they will behave
as if they were set to off. . .
My question is around smb2.read.access torture test where it tries to
open a file with different access flags including SEC_FILE_EXECUTE.
When run against a share with "map archive = no"(or implicitly assumed
by "store dos attributes" set) we cannot expect execute bit to be
present for the owner. Thanks to Ralph(and Michael, Guenther) who
helped me understand basic selftest architecture which adds
vfs_acl_xattr in [global] section for many torture tests including
smb2.read making it pass with `make test`.
Nevertheless, leaving "store dos attributes" at its default, why would
smbd create file with execute bit set for the owner? I hope its not
because of some umask calculation done at the end outside Samba because
if that's the case I would expect it to be set even when "map archive"
is explicitly set to 'no'. There seems to be some mismatch between
assumed and real behaviour.
[local-ext4]
comment = For samba share of local ext4
path = /mnt/ext4/
read only = No
[local-ext4-no-map-archive]
comment = For samba share of local ext4
map archive = No
path = /mnt/ext4/
read only = No
# smbclient \\\\192.168.122.101\\local-ext4 -U anoopcs%smb -c "put
/etc/motd foo; allinfo foo"
putting file /etc/motd as \foo (0.0 kb/s) (average 0.0 kb/s)
altname: foo
create_time: Wed May 13 04:21:10 PM 2020 IST
access_time: Wed May 13 04:21:10 PM 2020 IST
write_time: Wed May 13 04:21:10 PM 2020 IST
change_time: Wed May 13 04:21:10 PM 2020 IST
attributes: A (20)
stream: [::$DATA], 0 bytes
# smbclient \\\\192.168.122.101\\local-ext4-no-map-archive -U
anoopcs%smb -c "put /etc/motd bar; allinfo bar"
putting file /etc/motd as \bar (0.0 kb/s) (average 0.0 kb/s)
altname: bar
create_time: Wed May 13 04:26:38 PM 2020 IST
access_time: Wed May 13 04:26:38 PM 2020 IST
write_time: Wed May 13 04:26:38 PM 2020 IST
change_time: Wed May 13 04:26:38 PM 2020 IST
attributes: A (20)
stream: [::$DATA], 0 bytes
# ls -lh /mnt/ext4/
total 8.0K
-rw-r--r--. 1 anoopcs anoopcs 0 May 13 16:26 bar
-rwxr--r--. 1 anoopcs anoopcs 0 May 13 16:21 foo
Thanks,
Anoop C S.
More information about the samba-technical
mailing list