scp/sftp umask

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Craig White
Date:  
Subject: scp/sftp umask
On Thu, 2004-02-05 at 13:56, Gary Nichols wrote:
> On Thu, 5 Feb 2004, Craig White wrote:
> > # scp -r testdir exchange@localhost:
> > exchange@localhost's password:
> > #
> > and then finally...
> > back in the original directory...
> > ls -l
> > drwxrwxrwx    2 exchange dom_users     4096 Feb  5 10:20 testdir
> > -rwxr-xr-x    1 exchange dom_users      347 Feb  5 10:20 testfile2

> >
> > the directory is group writable, the file is not. This means that only
> > the user exchange can delete these files. This is not acceptable. This
> > has nothing to do with WinSCP
>
> Your permissions are getting whacked because you're not using the "-p"
> option to scp. Your command should be:
>
> scp -rp file user@localhost:/dir
>
> I have seen some man pages for scp that do not document this option for
> some reason.
>

---
hmmm I was doing the scp thing as a demonstration of my problem. The
typical user isn't gonna do anything from command line, rather use
WinSCP3 or MacSFTP - I am gonna have to write up passages on how to
configure each for default to set privileges for group write bit to be
set then. Damn.

Craig