Re: file mode of scp/sftp
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.
Thanks anyway.
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
Reply to: