Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

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).

share|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
    
Just came back to the question. I'd love to accept an answer, and while umask does show some things, it's still not an answer to the question. May just be that scp is broken. –  Mark0978 Mar 24 at 17:05
add comment

Here are some other pages discussing the issue. The first is about scp, while the second is about 000 permissions with another programs:

Apparently this is a problem with Cygwin's emulation of Unix-type file permissions on Windows filesystems with ACLs. The solution is to alter Cygwin's /etc/fstab file to make Cygwin ignore ACLs. Copying from one of those:

cp /etc/fstab /etc/fstab.install

echo "none /cygdrive cygdrive binary,posix=0,user,noacl 0 0" >> /etc/fstab

To activate the new setting, logout and login again logout ssh Adminstrator@hostname Then stop and start your cygwin processes.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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