Aurelin <aure...@aurelin.net> writes:

> I'm not that used to umask, but could it be that for some reason your
> default permission is set to 644?
> Because if you then subtract 006, you'd get 64-2.. Maybe this'd lead  to
> 640 (because.. Have you ever heard of a permission set to a value  below
> zero?)

That isn't how umasks work.  They're a bitmask that's applied with a
bitwise and, not subtraction.

With scp or sftp, the default file permission is whatever the ssh client
declares (usually 0644, but it could be 0666 or 0600 depending on the
client).  Then the umask is applied, which at most can remove permission
bits (not add them).

So if the client uploads a file and the client says the permissions should
be 0600, the file will never have less restrictive permissions than 0600.
The only thing umask can be used to do is make the permissions more
restrictive.

-- 
Russ Allbery (r...@stanford.edu)             <http://www.eyrie.org/~eagle/>

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
rssh-discuss mailing list
rssh-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rssh-discuss

Reply via email to