chmod cannot change group permission on Cygwin

前端 未结 7 1147
孤城傲影
孤城傲影 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 03:08

    This is a very annoying issue for me. In my case user135348's solution worked best. The biggest issue with the chown :Users -R approach is that every time a new file is created, it will be assigned to the unknown gid 1049120. It's very frustrating to keep changing file gid.

    I tried mkgroup too, but in my case it didn't work: My gid is 1049120.

    Based on the rules explained in Mapping Windows SIDs to POSIX uid/gid values : : 0x100000 offset is used for account from the machine's primary domain. Trying to remove the same offset from 1049120, you get 544, which is built-in Administrators group's RID.

    This account is not a member of the local Administrators group; we use SuRun to grant administrator rights without giving out credentials. In this case, mkgroup failed to generate all the possible gids.

    Editing the group file and adding a customized group name seems always to fix the issue easily.

提交回复
热议问题