chmod cannot change group permission on Cygwin

前端 未结 7 1251
孤城傲影
孤城傲影 2020-12-10 02:41

I am using Cygwin and trying to change the group access permission with chmod, e.g.

$ls -l id_rsa
-rwxrwxr-- 1 None 1679 Jun 13 10:16 id_rsa 

$ chmod g= id_         


        
7条回答
  •  遥遥无期
    2020-12-10 02:44

    I was having a similar problem to you, and I was using the NTFS filesystem, so Keith Thompson's answer didn't solve it for me.

    I changed the file's group owner to the Users group:

    chown :Users filename
    

    After doing that I was able to change the group permissions to my will using chmod. In my case, since it was an RSA key for OpenSSH, I did:

    chmod 700 filename
    

    And it worked. In Cygwin you get two groups by default, the Root group and the Users group. I wanted to add another group, but I wasn't able to do it with the tools I'm used to use on Linux. For that reason I just used the Users group.

提交回复
热议问题