设置GID位不工作

我有一个文件夹的这些权限。

drwxr-sr-x 2 root sharedmaster 4096 2010-09-22 10:36 rantest99 

我有用户tony这是在组共享主任。 当我试图从托尼mkdir它说权限被拒绝。 这是为什么?

我已经在目录上设置了gid位,以便新目录具有组读取权限。 我在哪里错了。

另外授予父目录的写权限 ,几乎可以肯定需要调整用户的umask,这个umask可能被设置为过滤掉group / other写入权限。

你可能想要设置一个0002的umask。

我相信你需要chmod g+w rantest99

编辑:

chmod g+w dirname使目录可由组的成员写入。 这是chmod g+s dirname作用:

info coreutils 'Directory Setuid and Setgid'

27.4目录和设置用户ID和设置组ID位================================== ========================

在大多数系统中,如果设置了目录的set-group-ID位,则新创build的子文件将inheritance与目录相同的组,并且新创build的子目录将inheritance父目录的set-group-ID位。 在less数系统中,目录的set-user-ID位对新子文件的所有权和新子目录的set-user-ID位具有相似的效果。 这些机制让用户更容易共享文件,减less了使用“chmod”或“chown”共享新文件的需要。

粘贴错误,请。

 test@u1004s02:/tmp$ ls -ald 1 drwxr-sr-x 2 root test 4096 Sep 22 05:49 1 test@u1004s02:/tmp$ id uid=1001(test) gid=1001(test) groups=1001(test) test@u1004s02:/tmp$ cd 1 test@u1004s02:/tmp/1$ 

关于setgid: http : //en.wikipedia.org/wiki/Setuid#setuid_and_setgid_on_directories