Operating System - HP-UX
1834461 Members
2833 Online
110067 Solutions
New Discussion

Re: sftp server default file protection creation

 
irt_1
Frequent Advisor

sftp server default file protection creation

Hi All,

How to change default file protection when transferring files using ftp?

Currently the default is like this: -rw------- 1 user1 users 1322 Dec 3 11:25 test.txt

Where is the config. file on the sftp/ssh server side?

Thank you very much.

Iwan
1 REPLY 1
yangk
Frequent Advisor

Re: sftp server default file protection creation

Hi,

I think you can use SftpUmask in the sshd_config to modify the umask.

see the man sshd_config

SftpUmask
Specifies an optional umask for sftp-server(8) subsystem
transactions. If a umask is given, this umask will override all
system, environment or sftp client permission modes. If no umask
or an invalid umask is given, file creation mode defaults to the
permission mode specified by the sftp client. The default is for
no umask.