Thanks to everyone for the replies.
Now I see the example doesn't implement those.
One more qustion. If "default_permissions" is used
for the mount, would fuse
enforce the permission check in the kernel? I am just
wondering if
"default_permissions"+a"allow_other" is
for the purpose. Assume when mknod
or mkdir is called, the uid and gid are set correctly, would
the subsequent
calls (e.g. open/chown...... and other access calls) be
checked against
permissions by fuse or the check has to be implemented on
user land, which
is too expensive especially when hook up with NFS.
Thanks again
Brian
----- Original Message -----
From: "Jean-Pierre ANDRE"
<jean-pierre.andre wanadoo.fr>
To: "Brian Wang" <ywang221 hotmail.com>; <fuse-devel lists.sourceforge.net>
Sent: Sunday, March 09, 2008 12:51 PM
Subject: re: [fuse-devel] file permission problem.
Hi Brian,
> Message du 09/03/08 01:49
> De : "Brian Wang" <ywang221 hotmail.com>
> A : fuse-devel lists.sourceforge.net
> Copie à :
> Objet : [fuse-devel] file permission problem.
>
>
> Now, my question is: how do I mount a fuse file system
accessible by a
> non-root user but when that user creates files,
"ls" will show that user
> as
> the owner?
>
When creating a file, you have to store its owner, group
and permission into your file system, and return them
when gettattr() gets called.
You may know the effective uid and gid of the process for
which fuse called your file system by :
fuse_get_context()->uid,
and fuse_get_context()->gid
You will also use these when checking for rights to access
a file... but as yet, fuse does not provide you with the
list
of supplementary groups for a full check.
Regards
Jean-Pierre
>
>
>
> Thanks
>
>
>
> Brian
>
>
------------------------------------------------------------
-------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
a>
> _______________________________________________
> fuse-devel mailing list
> fuse-devel lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fuse-devel
a>
>
>
------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
a>
_______________________________________________
fuse-devel mailing list
fuse-devel lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel
a>
|