Kernel ACL support for NFS/CIFS in 8.04?

Bug #173267 reported by Axel Pospischil
8
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

First: in my opinion this is NOT a duplicate of Bug #67175, because it affects the NEXT long term supported ubuntu. It is both, a bug for the former 6.06 LTS, the actual gutsy and a wishlist/bug for hardy (8.04 LTS).

It affects both the lacking NFSv3/v4 and the SMB(2)/CIFS network file system support for ACL's of the ubuntu kernel and user tools. E.g. accordingly patched get/setfacl, lacking of nfs4-acl-tools (see [3]) and not compiled NFSv3 ACL support in the generic kernel.

I am not a kernel developer but I cannot understand where the problem is, if major distributions (redhat/suse) seem to support nfs/cifs with acl out of the box - for about 2 years now (2005), right when ACL support came for SMB (see [4] page 133). So the kernel support must be mature and the user tools exist.

I consider this as a BUG concerning the "ubuntu linux kernel" flavour and "user tools" and cannot find any comment/roadmap from official side (canonical) - except [3] - on giving a solution to both client and server's side.

I also asked for an answer here at lauchpad with Question #18907 (see links below [1]) and Bug #173324 (Will nfs4-acl-tools be in 8.04? - [update] converted into Question #19120 see [7]). Please refer this for additional information.

Conclusion:

1. With 8.04 LTS in mind there should be a clear statement concerning NFS/SMB(2)/CIFS + ACL support in the kernel, so customers could decide - and ubuntu would like to address customers wishes, do they ;) One should not be forced to recompile the kernel and loose support.

2. One also has to check/assure, that gnome, kde and xfce file managers are supporting mounted directories via nfs/smb/cifs and handle acl's properly.

Sincerely yours Axel

Links:

[1] Question #18907 (https://answers.launchpad.net/ubuntu/+question/18907)
[2] Ubuntu Forum - NFS problem (http://ubuntuforums.org/showthread.php?t=339867&highlight=nfs%20acl#0.3290169355124337)
[3] Ubuntu forum - NFS server not presenting ACLs (http://ubuntuforums.org/showthread.php?t=428512&highlight=nfs%20acl#0.64162506203136)
[4] PDF: Proceedings of the Linux Symposium 6-2007 - A New Network File System is Born: Comparison of SMB2, CIFS, and NFS (https://ols2006.108.redhat.com/2007/Reprints/french-Reprint.pdf)
[5] PDF: Novell 5/2005 - Linux, Samba and ACLs: past, present, and future (http://www.sambaxp.org/uploads/media/05-Andreas-Gruenbacher_-_Linux_Samba_and_ACLs.pdf)
[6] PDF: NAS Conference 2005 - NFSv4 Co-existence with CIFS in a Multi-protocol Environment (http://nasconf.com/pres05/hayden.pdf)
[7] Question #19120 (https://answers.launchpad.net/ubuntu/+source/linux-meta/+question/19120)

>> [4] gives a very excellent and detailed view of the actual state in NFS/SMB(2)/CIFS linux development.

Axel Pospischil (apos)
description: updated
description: updated
description: updated
Axel Pospischil (apos)
description: updated
description: updated
Axel Pospischil (apos)
description: updated
description: updated
Axel Pospischil (apos)
description: updated
description: updated
description: updated
description: updated
description: updated
Axel Pospischil (apos)
description: updated
Axel Pospischil (apos)
description: updated
description: updated
Axel Pospischil (apos)
description: updated
description: updated
description: updated
Axel Pospischil (apos)
description: updated
Axel Pospischil (apos)
description: updated
Revision history for this message
Axel Pospischil (apos) wrote : Re: Some Tests - Kernel ACL support for NFS/CIFS in 8.04?

I know this is a very special theme for debian/ubuntu. And I like to do my part ;)
So I spent a few afternoon's to verify again what I used to know. But you can use the following informations/scripts to test it by yourself very quickly.

So I went and compiled a custom kernel (using the standard ubuntu 2.6.22 sources) with

 cat /boot/config-2.6.22.7-nfs-with-acl | grep ACL
  CONFIG_EXT3_FS_POSIX_ACL=y
  CONFIG_NFS_V3_ACL=y
  CONFIG_NFSD_V2_ACL=y
  CONFIG_NFSD_V3_ACL=y
  CONFIG_NFS_ACL_SUPPORT=m

I restarted the system.

Configuration:
1. The EXT3 directory is mounted with "defaults,acl,user_xattr"
2. The NFS directory "/home/exchange" is exported with (rw,no_subtree_check).
3. The NFS dir is mounted with "-t nfs -o rw,defaults,acl".
4. Same for SAMBA (hope this is correct, cause I don't use Samba in this context).
5. Create a user and group "exchange" and add yourself to the group.

 [exchange]
 path = /home/exchange
 writable = yes
 create mask = 0660
 directory mask = 0770
 profile acls = yes
 inherit acls = yes
 available = yes
 browsable = yes
 public = yes

CHMOD, CHOWN, ACL settings

See attached change_rights.sh. Copy the script into "/home/."
1. The directories get an "exchange" group, that every user is part of.
2. The directories have "g+s", so subdirs inherit the ability for members of "exchange" group to join.
3. Only the following ACL for directories is set, so new files will be created "g+rw":
      setfacl -d -m mask: -d -m mask:006

TESTS:
mount -t nfs -o acl,defaults,rw localhost:/home/exchange /home/a_user/exchange
OR (!) mount -t cifs -o user=a_user,password=a_password //localhost/exchange /home/a_user/exchange

cd /home
sh change_rights.sh && getfacl exchange && ls -l exchange/
touch exchange/testfile1 && ls -l exchange/
mkdir exchange/testdir1 && ls -l exchange/

This will provilde you with the necessary informations.

NFS Result:
1. The ACL's that were set with setfacl on a NON-NFS (!) mounted directory are shown correctly with "getfacl" in the shell and with e.g. "eiciel" in nautilus.
2. One cannot set ACLs with "setfacl" on a NFS mounted directory.
3. a) For both in shell and e.g. nautilus it is not possible to touch a file or make a directory.
   b) This is the case for root and the any user who should be able to do the job of a)

CIFS Result:
1. No ACLs seen at all. Not in shell nor in e.g. nautilus.
2. File creation: known bug - file groups get's extra execution bit.
3. Directory creation: OK

I blind tested the same on a updated SuSE 10.3 which works like expected.

Conclusion:
A I expected ACLs via NFS/SMB/CIFS are not usable for now.
And as mentioned in [3] above from a canonical emloyee there seems to be more issues than just comiling a new kernel.

Probably one has to test again the basic debian packages in testing/unstable.
I blind tested on a updated SuSE 10.3 in a virtual machine Works without problems.
We use SuSE 10.1 (ext3) at work without problems.

To come to an end: I am shure this will find a way into ubuntu some times - I hope soon ;)

Revision history for this message
Chuck Short (zulcss) wrote :

Re-assigning to correct package.

Changed in linux-meta:
importance: Undecided → Wishlist
Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Wishlist → Medium
status: New → Triaged
Revision history for this message
Tim Gardner (timg-tpi) wrote :

All of the NFS ACL config options are now enabled for the arch flavours. They are not enabled for the custom binary flavours, e.g., rt, xen, and lpia.

Changed in linux:
milestone: none → hardy-alpha-5
status: Triaged → Fix Committed
milestone: hardy-alpha-5 → hardy-alpha-4
status: Fix Committed → Fix Released
Revision history for this message
Axel Pospischil (apos) wrote :

Hi Tim,
wow I am really appreciate how reliable and fast you guys are working.
So there's my contribution from today, 12. Jan 2008.
This really make me happy ;) ;) ;)

I tested everything from scratch like in my bug decription above (common directory shared by different users that belong to a common group).

I updated my virtualbox hoary to the latest generic kernel and configured the system according to my initial bug posting above.
Problems:
cat /boot/config-2.6.24-3-generic | grep ACL
  [...]
  # CONFIG_NFSD_V3_ACL is not set
  # CONFIG_NFS_V3_ACL is not set

So I did the tests with the 2.6.24-"2", which is enabled.

========================
Prerequesites
========================
Remember to manually set
 /etc/exports -- /home/$exchangeUser localhost(rw)
 /etc/fstab -- Options for ext3: defaults,acl
and Reboot.

========================
1. Directory and file creation in the shell
========================
See attachment.
I am testing with the script "nfs_acl_test.sh".
1. Copy the script into "/home".
2. Run the script as root.
3. Then do "su testuser"
4. Run the script as testuser

NFS and ACL are fully working. (see attachment "shell_output")

========================
2. Do gnome/nautilus/eiciel do their job correct?
========================

Manually mount the NFS directory via
   mkdir /home/$USER/exchange
   mount -t nfs -o rw,defaults,acl localhost:/home/exchange/ /home/$USER/exchange/

Open nautilus and create empty folder and files.
Check properties dialog (Alt+Return).

NFS and ACL are fully working/visible.
All ACL settings are inherited like I would expect.

I'll keep an eye on the thing and let you know, if something changes.

Revision history for this message
Axel Pospischil (apos) wrote :

Shell Output attached to above posting.

Revision history for this message
Axel Pospischil (apos) wrote : 8.04/alpha3 - NFS and ACL working

Can confirm, that with

   linux-image-2.6.24-4-generic (2.6.24-4.6)

on hoary/alpha3 NFS and ACL is working.
See testing log attached.

Revision history for this message
Axel Pospischil (apos) wrote : 8.04/alpha3 - NFS and ACL working with nautilus and rsync

Additionally can confirm the following file/folder actions working properly on a nfs mounted directory

 - cp -av, mv
 - rsync -av --acls --delete (tested as root, seperate backup folder)
 - shell file and folder creation
 - nautilus file and folder creation, moving
 - all operations apply properly even when user changes

See testing log attached.

Revision history for this message
Manuel Zach (loogaroo) wrote :

Is the same thing with cifs also possible?
And will it be with hardy possible?

I have tested it with 2.6.24-5 and I get no acls.

Revision history for this message
Axel Pospischil (apos) wrote :

Hello Manuel, could you precise what exactly you did to use acl? Did you mount your ext3 partition in fstab with ACLs enabled (see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/173267/comments/1 above)?

Revision history for this message
Launchpad Janitor (janitor) wrote : Kernel team bugs

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

Revision history for this message
Valentijn Sessink (valentijn) wrote :

This has not been fixed for NFSv4 yet. The nfs4-acl-tools mentioned in the original bug report are still not in Ubuntu (not in Hardy, not in later releases). Also, libacl doesn't include the NFS4 to POSIX ACL translation.

This means that on a NFS4 file system, there's still no possibility to see, set or change ACLs.

Should I reopen the bug?

Revision history for this message
Derek Simkowiak (ubuntu-cool-st) wrote :

Yes, please re-open the bug.

Ubuntu Kernel Team: Please support ALCs and (user_xattr?) in NFS and Samba... including the latest versions of those protocols (like v4).

Revision history for this message
cotillion (tobias-schwan) wrote :

Can someone confirm that ACLs with NFSv4 will work on lucid? As you can see here http://packages.ubuntu.com/de/lucid/nfs4-acl-tools the package nfs4-acl-tools is now in the universe repository for lucid.

Is there a chance this packages will be backported to karmic or an older release?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.