Re: set umask for sftp connection
From: Per Hedeland (per_at_hedeland.org)
Date: 05/29/04
- Previous message: Per Hedeland: "Re: SFTP Batch without key"
- In reply to: Darren Tucker: "Re: set umask for sftp connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 28 May 2004 23:45:41 +0000 (UTC)
In article <c94g16$hfu$1@gate.dodgy.net.au> dtucker@dodgy.net.au (Darren
Tucker) writes:
>In article <5e909902.0405270139.73a7b6b0@posting.google.com>,
>Pat Buerki <bpm13@gmx.net> wrote:
>>bpm13@gmx.net (Pat Buerki) wrote in message
>news:<5e909902.0405250654.4fb8711@posting.google.com>...
>>> However, when copying files, these have a
>>> permission of 644, which imho is not set by the unix system.
>>
>>ssh takes the umask of the parent sshd process, which would normally
>>be inherited from init, unless restarted by hand.
>
>OpenSSH 3.7x and up will pick up the user's umask from /etc/default/login
>on platforms that have it (like Solaris).
Maybe it should also be pointed out that files being created with 644 in
no way rules out that the umask actually *is* 002 (as apparently desired
by the OP). I believe sftp will (try to) preserve the permissions of the
source file - if it is 644, it neither will nor should become 664 at the
destination just because the umask there is 002. (Arguably if sftp tries
to preserve permissions, it should actively "disobey" the umask by chmod
after creation - but even if it doesn't, umask can of course only ever
*clear* bits.)
--Per Hedeland
per@hedeland.org
- Previous message: Per Hedeland: "Re: SFTP Batch without key"
- In reply to: Darren Tucker: "Re: set umask for sftp connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|