I asked this over at superuser already but didn't get much input on it.
I have a Mac (El Capitan 10.11.6) client that is connected to an Ubuntu server (18.04 LTS) running Samba, sharing a ZFS pool. Everything works great, except that whenever I add a file to the server, the permissions are changed.
For example, here's foo.txt on the mac:
$ ls -l foo.txt -rw-r--r-- 1 leetbacoon staff 160 Feb 21 15:37 foo.txt
When it is clicked and dragged to the server, the server copy changes the attributes:
$ ls -l /Volumes/SMB\ Share/foo.txt -rwx------ 1 leetbacoon staff 160 Feb 21 15:37 /Volumes/SMB\ Share/foo.txt*
Copying the file from the server back to my Mac retains those permissions:
$ ls -l ./Copied\ From\ Server/foo.txt -rwx------ 1 leetbacoon staff 160 Feb 21 15:37 ./Copied\ From\ Server/foo.txt*
I want to have the file permissions retained when copying to the server, i.e.:
$ ls -l /Volumes/SMB\ Share/foo.txt -rw-r--r-- 1 leetbacoon staff 160 Feb 21 15:37 /Volumes/SMB\ Share/foo.txt
ls -l commands were executed on the Mac client.