scp/sftp umask

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Gary Nichols
Date:  
Subject: scp/sftp umask
On Feb 5, 2004, at 2:28 PM, Chris Gehlker wrote:
>
> But -p preserves the permission from the source file. Craig wants them
> to be set by the destination umask. At least that's what I
> understand. rcp and cp do it that way.


Ah, I had to go back a few messages - but I believe you are correct.
My bad.

To the best of my knowledge, scp has always ignored UMASK on the
destination shell side. Most of my automated scripts between boxes do
something like this:

scp -P $PORT $FILE $USER@$HOST:$DIR
ssh $USER@$HOST CHMOD 760 $DIR/$FILE

(assumes that you have shared public keys setup)

Sorry Craig, didn't read back far enough.