When I'm copying files from my Windows box to a Linux box using cygwin's scp, the permissions come out as 000. This doesn't happen when I copy from Linux to Linux, so I'm thinking it's related to some configuration on my Windows box. But where is that configuration?

Edit: Under bash, umask prints 0022. The behavior of scp is the same, whether I'm running bash or CMD.

link|improve this question
feedback

1 Answer

Run umask to see if the rights are being masked off. The fewer the bits set, the more rights that should be set. umask 022 is a common setting (disabling writing by group and other).

link|improve this answer
within bash umask is 0022 (which is strange, being 4 digits). Within the cmd prompt (where I am when I'm running scp, it doesn't exist so) it appears to be a builtin command. – Mark0978 Aug 25 '11 at 14:57
The highest digit is for suid/sgid/sticky, which can be omitted when setting the mask, and, yes, umask is built into the shell. – Klox Aug 25 '11 at 15:12
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.