How to "match" permissions between smb mount and server ??

vicmarto

Explorer
Joined
Jan 25, 2018
Messages
61
Please, how can I match the permissions between a smb mount and the server ??

These are the local permission in the server (FreeNAS 11.3), files 640 and folders 755:

Code:
root@freenas # ls -la
total 7
drwxr-xr-x  3 vicmarto  staff     5 Feb 17 01:42 ./
drwxr-xr-x  3 vicmarto  staff     3 Feb 17 01:39 ../
-rw-r--r--  1 vicmarto  staff     0 Feb 17 01:42 file
drwxr-xr-x  2 vicmarto  staff     2 Feb 17 01:41 folder/


But the client (Debian 10.3 & macOS Catalina) are mounting it with 600 permissions for files, and 700 for folders:

Code:
vicmarto@ws # ls -la
total 74
drwx------  1 vicmarto  staff  16384 17 feb 01:42 .
drwxr-xr-x  4 root      wheel    128 17 feb 01:41 ..
-rwx------  1 vicmarto  staff      0 17 feb 01:42 file
drwx------  1 vicmarto  staff  16384 17 feb 01:41 folder


Please, can the permissions be "matched" automatically?? (that is, clients always show the local permissions (640/755), instead of 600/700, like NFS always do). How??
 
Last edited:

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Which version of FreeNAS are you using? I can only speak for debian. How are you mounting the SMB share? At CLI, at boot with fstab entry, or via a desktop file manager? If at CLI or via fstab , you could try using the "file_mode" and "dir_mode" options. ( see man mount.cifs)
 
Top