I have a directory shared in my Ubuntu VM. This is my smb.conf:
...
[share]
comment = Ubuntu File Server Share
path = /home/foo/share
browsable = yes
guest ok = yes
read only = no
create mask = 0644
Almost everything works fine, i.e. when a new file is created, it is masked 0644
. But also whenever I open (in Windows) and save an existing file, that file's permissions are also set to 0644
. That's pretty annoying when editing scripts, which had previously been masked 0755
or 777
.
Is there a way to make Samba keep existing permission masks when files are overwritten?
[edit] ... while creating new files with permissions 0644