Bug 761973 (GLUSTER-241) - Gluster not honouring SETGID flag
Summary: Gluster not honouring SETGID flag
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-241
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Anand Avati
QA Contact:
URL:
Whiteboard:
: GLUSTER-72 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-02 06:48 UTC by Sachidananda Urs
Modified: 2015-09-01 23:04 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: RTA
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Sachidananda Urs 2009-09-02 06:48:10 UTC
RT ticket #1234:

We have setgid problem on glusterfs mount. Please refer the problem report submitted by our customer.

=============================
I've got an issue where GlusterFS is not honouring the SETGID bit being
raised on a directory. This is supposed to ensure that any directories
created underneath one that has the SETGID bit set are created with the
same GID as its parent. This is something that needs to work as I do too
much stuff that relies on proper permissions being set.

As an example:

[root@web01-dmts www]# ls
total 2696
drwxr-s--- 6 dmtsbiz apache 4096 Sep 1 19:14 . <--- SETGID bit
set
drwxr-s--- 3 root apache 41 Sep 1 14:37 ..
-rw-r--r-- 1 dmtsbiz apache 33 Sep 1 14:37 .bash_logout
-rw-r--r-- 1 dmtsbiz apache 176 Sep 1 14:37 .bash_profile
-rw-r--r-- 1 dmtsbiz apache 124 Sep 1 14:37 .bashrc
drwxr-s--- 2 dmtsbiz apache 6 Sep 1 14:37 cgi-bin
drwxr-s--- 2 dmtsbiz apache 6 Sep 1 14:37 images
drwxr-xr-x 10 root root 4096 Aug 9 13:59
phpMyAdmin-3.2.1-all-languages <--- Extracted archive wrong GID
-rw-r--r-- 1 root root 2739999 Aug 9 14:27
phpMyAdmin-3.2.1-all-languages.tar.bz2 <--- Downloaded file wrong GID
drwxr-x--T 2 root apache 6 Sep 1 14:37 usage

It should set the same group as the parent and the SETGID bit should be
set on each child directory created under the parent. I'm using XFS on
the backing bricks. I don't use LDAP on those nodes, however the nodes
that mount the GlusterFS export either use LDAP or have their passwd
files set to mirror each other (only the web servers use LDAP...things
like mail servers that only have 2 real UID/GID's I handle differently,
but still ensuring that everything maps properly...but this is outside
of that kind of issue I think as I can manually set permissions and
groups...but things like SETGID functionality is broken)

I'm running Gluster 2.0.6. Brick servers are CentOS 5.3 64 bit based as
are the machines mounting the exported file system.

This is fairly critical for me to get going as this is stopping me from
doing a migration to Gluster from NFS as the cleanup on the sheer number
of websites I'd have to perform is insane...

======================================

Comment 1 Vikas Gorur 2009-09-04 06:26:17 UTC
*** Bug 72 has been marked as a duplicate of this bug. ***

Comment 2 Vikas Gorur 2009-09-04 07:59:35 UTC
Patches for review:

release-2.0: http://patches.gluster.com/patch/1250/
mainline: http://patches.gluster.com/patch/1249/

Comment 3 Anand Avati 2009-09-08 07:22:31 UTC
PATCH: http://patches.gluster.com/patch/1257 in master (storage/posix: Handle setgid bit on directories correctly)

Comment 4 Anand Avati 2009-09-08 07:23:21 UTC
PATCH: http://patches.gluster.com/patch/1258 in release-2.0 (storage/posix: Handle setgid bit on directories correctly)


Note You need to log in before you can comment on or make changes to this bug.