Bug 762130 (GLUSTER-398) - All Translators: Management/internal fops must be issued with root uid/gid
Summary: All Translators: Management/internal fops must be issued with root uid/gid
Keywords:
Status: CLOSED DUPLICATE of bug 762329
Alias: GLUSTER-398
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Anand Avati
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: GLUSTER-399
TreeView+ depends on / blocked
 
Reported: 2009-11-23 06:56 UTC by Shehjar Tikoo
Modified: 2015-12-01 16:45 UTC (History)
3 users (show)

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


Attachments (Terms of Use)

Description Shehjar Tikoo 2009-11-23 06:56:09 UTC
The problem:

internal fops or management fops: fops that are not issued by the user application, for eg, the fops needed for self-heal.

These internal fops should be differentiated with the fops issued by the user in terms of the uid,gid that is used to issues these fops. Till now, we have been performing all fops on the bricks, specifically, in posix, as root user while depending on FUSE to perform the access control checks. This approach does not work for NFS since it caches file/dir attributes on the client. Here is how it fails:

On NFS client system:
1. Create a file with (uid,gid)=(65534,65531) with permissions as 644.
2. Change user using su to user with (uid,gid)=(65532,65532). For the purpose
of operating on the above file, this user will be considered as "Other" in the
file mode bits.
3. Since posix functions as root, any change to the file above by this user is allowed since posix is not performing a setfs[ug]id, i.e. the access checks pass as the modifying fop is being done as root.
4. Enabling the setfs[ug]id calls in posix makes this work correctly, due to obvious reasons. However, this change, I've been told will break translators like replicate which try to issue a self-heal using the (uid,gid) of the user that caused a stat fop on the file/dir. BUT, this user might not have the permission for a stat on the file/dir leading to a failure of the self-heal operation.

I'd request every translator maintainer to please change any internal/management fop in your translator to used root uid/gid by default while letting the user-generated fops to be run with the uid,gid of the user.

Comment 1 Anand Avati 2010-02-22 12:47:21 UTC

*** This bug has been marked as a duplicate of bug 597 ***


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