Set acl failed on FUSE exported by NFS

View: New views
2 Messages — Rating Filter:   Alert me  

Set acl failed on FUSE exported by NFS

by Chen_Yi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi, everyone

We are building a system using FUSE as its presentation layer and export
it with NFS. On the NFS client, we meet below problems when we do
setfacl operation:
[root@Yi-001 nfs]# setfacl -m u:lihui:rwx file3
setfacl: file3: Operation not supported

NFSv3 does support the posix ACL and after checking the implementation
in FUSE kernel module, I found that fuse does not set the MS_POSIXACL
flag in its super block while the implementation of NFS checks whether
the target file system supports extended ACL by checking the super block
of target system. As fuse does not set this flag, NFS server does not
even attempt the operation but return the client with EOPNOTSUPP
directly.

Below is my simple fix and it works:
fuse-2.7.4/kernel/inode.c 2008-07-25 14:17:21.000000000 -0400
+++ kernel/inode.c  2009-04-01 22:50:36.000000000 -0400
@@ -794,6 +794,7 @@
        sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
    }
    sb->s_magic = FUSE_SUPER_MAGIC;
+   sb->s_flags |= MS_POSIXACL;
    sb->s_op = &fuse_super_operations;
    sb->s_maxbytes = MAX_LFS_FILESIZE;
 #ifndef FUSE_MAINLINE

This seems a simple fix to get committed and I noticed that the problem
still exists in the latest 2.8.1 release, is there any plan to fix it?

Best regards,
Yi

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
fuse-devel mailing list
fuse-devel@...
https://lists.sourceforge.net/lists/listinfo/fuse-devel

Re: Set acl failed on FUSE exported by NFS

by Jean-Pierre André :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Chen_Yi@... wrote:

> Hi, everyone
>
> We are building a system using FUSE as its presentation layer and export
> it with NFS. On the NFS client, we meet below problems when we do
> setfacl operation:
> [root@Yi-001 nfs]# setfacl -m u:lihui:rwx file3
> setfacl: file3: Operation not supported
>
> NFSv3 does support the posix ACL and after checking the implementation
> in FUSE kernel module, I found that fuse does not set the MS_POSIXACL
> flag in its super block while the implementation of NFS checks whether
> the target file system supports extended ACL by checking the super block
> of target system. As fuse does not set this flag, NFS server does not
> even attempt the operation but return the client with EOPNOTSUPP
> directly.
>
> Below is my simple fix and it works:
>  

Hmm. Aren't you setting the flag, irrespective of the
underlying file system capabilities ?

I would prefer this flag to be set by the file system
in the init method and routed to the kernel module.

Regards

Jean-Pierre




------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
fuse-devel mailing list
fuse-devel@...
https://lists.sourceforge.net/lists/listinfo/fuse-devel