0

I Have a File Server that hosts SFTP for linux clients and SMB for windows clients. There are two directories under /srv/fs. home and public. home needs to have a 0700 umask and public needs to have a 0775 umask. In SMB i can set this by using two shares, home and public, and changing the umask accordingly in the samba config on the server for both shares. But i would like to not have to use SMB on linux clients as i have had bad experiences with smb on linux in the past. So i would like to use SFTP/SSHFS. However, with the included sftp server on debian, i wouldn't know any way to set umasks for specific folders. Thus, the permissions for public are broken. When user1 creates a file in public, user2 cannot access it. How should I solve this?

this is the client fstab for the public folder

user2@10.0.0.220:/srv/fs/public /home/user2/NAS-Public  fuse.sshfs  noauto,_netdev,idmap=user,transform_symlinks,uid=1000,gid=1000,allow_other,default_permissions 0 0

and this is the server sshd_config line for sftp.

Subsystem   sftp    /usr/lib/ssh/sftp-server
  • 2
    Does this answer your question? [In sftp, how to set the default permission for all files in a folder?](https://superuser.com/questions/332284/in-sftp-how-to-set-the-default-permission-for-all-files-in-a-folder). Also [How to set umask for a folder and it's subfolder?](https://superuser.com/questions/612771/how-to-set-umask-for-a-folder-and-its-subfolder) – harrymc Jul 22 '23 at 19:36
  • no, sadly. because the SFTP subsystem doesn't recognise ACLs and setting the umask for the server is not possible on SSHFS EDIT: i dismissed the inotify option but i will be using that one. – Maximal_98 Jul 28 '23 at 21:59

0 Answers0