Ask Ubuntu Asked by konstapel on December 13, 2021
I created an SFTP Server with Jailed Folders. I want to move these Folders on a mounted NAS Storage. My issue is the right Folder permissions that come from the mount. The Linux Box is connected with Active Directory, so users and groups get delivered from there.
Folder Structure how it should be:
Appdata <- root:root 755
Appdata/SFTPdata <- root:root 700
Appdata/SFTPData/%h <- root:root 755
Appdata/SFTPData/%h/upload <- user:usr-sftp 700
When i now mount the NAS Storage with
mount -t cifs -o user=admin,gid=13371337,rw,forcegid,domain=DOMAIN.lan,iocharset=utf8,file_mode=0770,dir_mode=0770 //storage.DOMAIN.lan/SFTPTestUnix /Appdata/
as root, all Folders in the mounted drive are now set as root:usr-sftp (the gid is the AD group usr-sftp) with chmod 770 (coming from file and dir_mode).
Question: How can I workaround this issue. Is there a better way to do this? Im currently using cifs, is nfs more suitable for this?
found the solution to this issue. CIFS (as using the SMB standard) is not able to forward local root permissions. NFS is, as long as you set no_root_squash. In my case I am using NetApp and I can activate SuperUser forwarding what solved my issue.
Answered by konstapel on December 13, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP