On Thu, Oct 26, 2000 at 08:54:24PM -0500, David Talkington wrote:
| This was first mentioned in July, and I've seen no progress on the
| thread.  It doesn't appear that my last message on this topic reached
| the list; I apologize if we end up with duplicates.
| 
| I was disturbed to see that during uploads via scp from a Linux
| workstation to a Solaris server, where the permissions on the original
| file were 644 and the umask for the receiving user was 022, the
| uploaded file was created 666.  I uploaded a file to my public web
| directory on the server some weeks ago, and only just now discovered
| that it was world-writeable.  I confirmed that scp was to blame by
| repeating the upload, checking the umask and perms before the
| transfer.

Does this behaviour persist if you use the -p flag with scp?

Without it I would guess (from the behaviour) that the sshd is running with a
umask of 0. You can test this by tweaking the umask in the sshd startup file
on the server and restarting sshd.

The notion "umask for the receiving user" is pretty nebulous; such things
are normally set during the login process via the /etc/profile file or and/or
the user's ~/.profile file. Neither is consulted by scp.
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

And what country can preserve its liberties, if its rulers are not warned
from time to time that this people preserve the spirit of resistance?  Let
them take arms . . . The tree of liberty must be refreshed from time to time
with the blood of patriots and tyrants.
        - Thomas Jefferson, letter to William S. Smith

Reply via email to