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.

I work in "C:\Users\leyou.ssh"

I need to chmod id_rsa to 600 as it's currently 644, but it has no effect.

Hence I tried "chgrp Users id_rsa" but it doesn't work neither and the group remains as "mkpasswd".

The above happens in a windows cmd (with C:\cygwin64\bin in %PATH%).

When I try from the cygwin bash, chgrp and chmod work, but when I run "ssh root@xxx.xxx.xxx.xxx" it fails saying that id_rsa is 644 even though I get 600 through ls -la.

It doesn't make sense at all...

share|improve this question
    
What's the error when you run chgrp or chmod? These are not cmd commands, but Cygwin commands. –  trysis Jul 10 at 15:13
    
Sorry I was not very clear. I used cmd but I have C:\cygwin64\bin in %PATH%. There is no error. "chgrp -Rv Users id_rsa" actually returns "group of `id_rsa' retained as Users". But "ls -la" still shows "-rw-r--r-- 1 leyou mkpasswd 1675 Jul 1 2012 id_rsa". Same with chmod, no effect. –  leyou Jul 10 at 15:20
    
Then it is an issue with Cygwin not updating Windows's permissions properly. As Windows generally doesn't have as sophisticated permissions systems as Unix-based systems, which Cygwin tries to emulate, this is pretty much impossible sometimes. –  trysis Jul 10 at 15:46
    
But it seems to work for others: superuser.com/questions/397288/… :/ –  leyou Jul 10 at 15:49
    
What I meant with my last comment is that Cygwin's permissions are probably inconsistent, meaning they work sometimes but not other times. Again, this is pretty much unavoidable, as it's trying to make a filesystem behave like another filesystem, and that's always hard. Also, Cygwin's "permissions database" may not be consistent, meaning it could think the permissions are changed even though they are not. Finally, Cygwin may not have permission to edit permissions of some files, but it may think it does. –  trysis Jul 10 at 15:57

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.