On 26/10/2024 15:24, Michael Tokarev wrote:> You need create mask = 0755 (or 0644, but watch for directory
> mask).? This is not like the unix umask thing, this it the
> reverse of it.? Please re-read man 5 smb.conf, it is pretty
> clear about this, with examples.? More, the default value is
> exactly what you need.
>
> Speaking of the X bits, these are mapped to DOS attributes,
> archive/hidden/system.? For these, see `store dos attributes`
> and `map system`, `map hidden` etc in smb.conf manpage.
Using "force create mode = 0644", a new file is still rwx r r, not rw
r
r as expected :-/
The man page
<http://mrtg.easyco.net/easydocs/linux/man/man5/smb.conf.htm> doesn't
include "store dos attributes".
"map system: This controls whether DOS style system files should be
mapped to the UNIX group execute bit. Note that this requires the
'create mask' to be set such that the group execute bit is not masked
out (ie. it must include 010). See the parameter "create mask" for
details. Default: map system = no
map hidden : This controls whether DOS style hidden files should be
mapped to the UNIX world execute bit. Note that this requires the
'create mask' to be set such that the world execute bit is not masked
out (ie. it must include 001). See the parameter "create mask" for
details. Default: map hidden = no"
What's the difference between "create mode" and "force create
mode"? Are
there other default options that could explain why I'm not getting the
expected access bits?
=======rm /Backup/test.ico
======== testparm
...
[write]
; create mode = synonym for create mask
force create mode = 0644
=======systemctl reload smbd
systemctl status smbd
=======C:\> cp test.ico \\debian\write
=======ll /Backup/
-rwxr--r--? 1 nobody 9062 Oct 27 11:58 test.ico
On 26/10/2024 13:00, Rowland Penny via samba wrote:
> It could be that the permissions are being inherited from the parent
> directory, or if it is a mount, the mount isn't allowing the
> permissions to change.
Could those explain why I'm still not getting rw r r?
===========root at debian:/# mount
/dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro)
root at debian:/# ll /
drwxr-xr-x?? 4 nobody? 4096 Oct 27 11:58 Backup/
============