chmod不能更改cygwin的组权限 [英] chmod cannot change group permission on cygwin

查看:299
本文介绍了chmod不能更改cygwin的组权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用cygwin并尝试使用chmod更改组访问权限,例如。

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_rsa 

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

但这不行。我可以更改用户和其他人的权限。看来组的权限级别与用户的权限级别一样?

But this does not work. I can change permission for user and others. Seems that the permission level for group somehow keeps the same as that of user?

推荐答案

这可能晚了,类似的问题,你和我使用一个NTFS文件系统,所以基思汤普森的答案没有解决它。

This might be late but I was having a similar problem to you and I was using a NTFS filesystem so Keith Thompson's answer didn't solve it for me. I'm ansering so other people having the problem can benefit.

我所做的是将文件的群组所有者更改为用户组:

What I did was change the file's group owner to the Users group:

chown :Users filename

这样做,我能够改变组权限为我的意志使用chmod,在我的情况下,因为它是openssh的rsa键我做了:

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

事实是,在Cyqwin中,您默认获得2组,根组和用户组。我想添加另一个组,但是我不能使用我在Linux上使用的工具。因此,我只是使用了用户组。

And it worked. Thing is that in Cyqwin you get 2 groups by default, the Root group an the Users group. I wanted to add another group but I wasn't able to do it with the tools I'm used to utilize on Linux. For that reason I just used the Users group.

这篇关于chmod不能更改cygwin的组权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆