我有一个名为的目录/workspace
,如下所示:
[root@machine workspace]# ls -al
total 7
drwxr-s---. 7 root workspace 4651468242 Nov 16 14:41 .
dr-xr-xr-x. 22 root root 4096 Nov 15 11:36 ..
(我省略了它的子目录。你可以看到它/workspace
属于该组workspace
)
然后有一个用户如下:这应该允许yang
他
进入,但实际上他不能:
但是在组中的所有用户中,他是唯一一个有这个问题的人。其他用户可以正常访问,例如:
更多细节在这里:id
[root@machine workspace]# id yang
uid=563(yang) gid=1701(yang) groups=1701(yang),1044(workspace)
/workspace
[root@machine workspace]# su - yang
Last login: Mon Nov 22 10:05:41 CST 2021 on pts/46
[yang@machine ~]$ cd /workspace/
-bash: cd: /workspace/: Permission denied
workspace
/workspace
[root@machine workspace]# id zhao
uid=651(zhao) gid=651(zhao) groups=651(zhao),1044(workspace)
[root@machine workspace]# su - zhao
Last login: Mon Nov 22 10:13:27 CST 2021 on pts/103
[zhao@machine ~]$ cd /workspace/
[zhao@machine workspace]$
[yang@machine ~]$ id
uid=563(yang) gid=1701(yang) groups=1701(yang),1044(workspace) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[zhao@machine ~]$ id
uid=651(zhao) gid=651(zhao) groups=651(zhao),1044(workspace) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
在 CentOS 6.9 和 7.9 上都遇到了令人沮丧的问题。有人可以帮我吗?谢谢!