diff -Naur linux-2.4.26rc1/fs/open.c linux-2.4.26rc1_/fs/open.c --- linux-2.4.26rc1/fs/open.c 2004-04-02 14:46:26.000000000 +0200 +++ linux-2.4.26rc1_/fs/open.c 2004-04-02 15:01:21.000000000 +0200 @@ -587,8 +587,10 @@ * 19981026 David C Niemi * * Removed the fsuid check (see the comment above) -- 19990830 SD. + * + * Always remove SGID bit to comply with POSIX. */ - if (((inode->i_mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) + if (((inode->i_mode & S_ISGID) == S_ISGID) && !S_ISDIR(inode->i_mode)) { newattrs.ia_mode &= ~S_ISGID;