I have a Linux server, and a NAS device from Synology. Both systems have matching sets of user names.>From the server, I create a mount through the following command:$ sudo mount.cifs //diskstation/usr /mnt -ouser=master,multiuser,setuids,idsfromsid The expectation is that the particular combination of mount options makes the ownership and permissions of files on the mount match those on the server, with users mapped according to identity on symbolic names. In contrast, I observe that all the files are owned by root, and not accessible to regular users. How may I achieve the desired mapping of ownership and permissions, based on user name? Note that it is not necessary that permissions on the mount are reported as on the NAS, which uses a non-POSIX ACL system, only that the NAS enforces the permissions of files in the mount according to its rules. The NAS runs Samba 4.10.18 and the server runs version 4.11.6. Note that as Synology tries to limit the configurability of server shares, it is preferred to achieve the desired effect with minimal alteration of the NAS configuration.
On 23/06/2021 01:40, Eric Levy via samba wrote:> I have a Linux server, and a NAS device from Synology. Both systems > have matching sets of user names. > > From the server, I create a mount through the following command: > > $ sudo mount.cifs //diskstation/usr /mnt -ouser=master,multiuser,setuids,idsfromsid >You have a problem with using the 'multiuser' option, it only works with a 'sec=' option that doesn't require passwords e.g. kerberos Try reading 'man mount.cifs' Rowland
Eric Levy via samba <samba at lists.samba.org> writes:> I have a Linux server, and a NAS device from Synology. Both systems > have matching sets of user names. > > From the server, I create a mount through the following command: > > $ sudo mount.cifs //diskstation/usr /mnt -ouser=master,multiuser,setuids,idsfromsididsfromsid is a workaround to store unix ids inside SID. If you want to map real existing SID to proper uids you need to * setup Winbind on the system doing the mount * make sure it is able to resolve sid/uid (you can test with wbinfo utility) * make sure you have cifs-utils and keyutils installed * make sure /etc/request-key.conf has an cifs.idmap entry * mount with cifsacl option instead of idsfromsid Cheers, -- Aur?lien Aptel / SUSE Labs Samba Team GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 N?rnberg, DE GF: Felix Imend?rffer, Mary Higgins, Sri Rasiah HRB 247165 (AG M?nchen)