sftp umask

Discuss new features and functions
Posts: 9
Joined: 28 Apr 2020

zoushenliang

Is it possible to add settings for sftp umask, or to use server system settings instead
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

AFAIK it's SFTP-server-dependent whether a umask will be applied. In any case, FFS sets the following values, which are currently hard-coded:
rw- r-- r-- [0644] default permissions for newly created files
rwx r-x r-x [0755] default permissions for newly created folders
Posts: 9
Joined: 28 Apr 2020

zoushenliang

Before version 10.19, the server's umask settings were valid, but starting with version 10.20, the server's umask settings are invalid.
Posts: 9
Joined: 28 Apr 2020

zoushenliang

I need group members to have permission to write. The server tried various ways to set the default umask, such as alternate-sftp -u 002, pam_umask.so umask=002, and modify the umask of login.defs to 002. Also I'm using the latest ubuntu server