[Gluster-devel] xlator uid/guid question

August R. Wohlt glusterfs at isidore.net
Sat Jan 19 19:00:23 UTC 2008

Hi glusterfs hackers,

I am trying to write a simple xlator similar to the fixed-id one that comes
with the source code.

The fixed-id xlator passes all calls through to the underlying volume and
then mangles the uid and gid of the stat structures on the way back to the
client, so what you end up with when looking at a mount is a directory of
files that appear to be owned by a fixed uid.gid, but really on the
underlying volume, they are created as the original user, which can cause
interesting permission issues.

I would like to modify this behavior so that the files get created on the
underlying volume with the fixed-id as well (even if just for the
superuser). I can do this in the chown functions with something like this
easy enough:

 struct fixed_id *id = (struct fixed_id *)this->private;
  if (id->fixed_uid_set) uid = id->fixed_uid;

before the STACK_WIND, and it works when I chown a file on the mount, but
how do I intercept the uid when a file is being created in the first place?
I don't see any arguments to create() that are applicable. Does fuse just
use the user from the calling process to do this?


More information about the Gluster-devel mailing list