The mode of file on server is "644" but when I access through the mount, the mode is "755". I want to keep mode the same. Both server and client are ubuntu system.
This is the smb.conf.
[shared]
comment = shared directory
path = /share
browsable = yes
valid users = user
read only = no
writable = yes
force user = user
guest ok = yes
available = yes
browsable = yes
public = yes
create mask = 0777
directory mask = 0777
This is the line from /etc/fstab.
//server/shared /mnt/shared cifs username=user,password=...,uid=...,gid=... 0 0
Try the suggestion here: https://stackoverflow.com/questions/20958888/preserving-file-permissions-for-samba-shares-when-file-is-edited
But doesn't seem to work, :(