[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: file mode of scp/sftp

On Wed, 04 Jan 2012 18:48:31 +0000, T o n g wrote:

> On Wed, 04 Jan 2012 17:23:12 +0000, Camaleón wrote:
>>> If users scp/sftp to my host, how is the default mode of files copied
>>> determined? Is it from users' umask in their ~/.profile, or somewhere
>>> else?
>> For ssh connections I'm not sure this still applies. Look at "man 8
>> sshd" and scroll down to the "login process" section.
> From which it looks like one's ~/.profile setting (eg umask) is not
> honoured when doing scp. That complies with my observation. From
> How the SCP protocol works
> http://blogs.oracle.com/janp/entry/how_the_scp_protocol_works
> It looks like scp will just blindly apply 0644 to files and 0755 to
> directories. However, I was trying to enable the group write bit.

Additional info:

Setting default permissions on files and directories copied with scp or 

Change permissions upon uploading with scp



Reply to: