NFS4: exports options are ignored for subdirs

Bug #665738 reported by Vidar Hoel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nfs-utils (Debian)
Fix Released
Unknown
nfs-utils (Ubuntu)
New
Undecided
Unassigned

Bug Description

I am trying to set up a new NFS4 server, but it seems like the server respects options which are defined for the export _root_ directory (fsid=0), ignores deviating options that are specified for any of the exported subdirectories (i.e., the settings for the
root dir are used instead).

Example:

I followed the instructions on https://help.ubuntu.com/community/SettingUpNFSHowTo and made this example /etc/exports on the server:

/opt/exports/test 192.168.10.14/32(rw,fsid=0,insecure,no_subtree_check)
/opt/exports/test/dir1 192.168.10.14/32(rw,root_squash,insecure,no_subtree_check,async)
/opt/exports/test/dir2 192.168.10.14/32(rw,no_root_squash,insecure,no_subtree_check,async)

I mount it on the client (192.168.10.14):

# mount -t nfs4 -o proto=tcp nfsserver:/ test/
# mount -t nfs4 -o proto=tcp nfsserver:/dir1 dir1/
# mount -t nfs4 -o proto=tcp nfsserver:/dir2 dir2/

root should be able to write to test/dir2 and dir2, but:

# touch test/x test/dir1/x test/dir2/x dir1/x dir2/x
touch: cannot touch `test/x': Permission denied
touch: cannot touch `test/dir1/x': Permission denied
touch: cannot touch `test/dir2/x': Permission denied
touch: cannot touch `dir1/x': Permission denied
touch: cannot touch `dir2/x': Permission denied

If I, however, change /etc/exports on the server to:

/opt/exports/test 192.168.10.14/32(rw,fsid=0,no_root_squash,insecure,no_subtree_check)
/opt/exports/test/dir1 192.168.10.14/32(rw,root_squash,insecure,no_subtree_check,async)
/opt/exports/test/dir2 192.168.10.14/32(rw,no_root_squash,insecure,no_subtree_check,async)

and umount the dirs on the client, run "exportfs -ra" (or reboot or restart of nfs-kernel-server) and then mount the same dirs as before, I should be able to write to test, test/dir2 and dir2. However:

# touch test/x test/dir1/x test/dir2/x dir1/x dir2/x
#

The server does not respect the options for the subdirs.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: nfs-kernel-server 1:1.2.0-4ubuntu4
ProcVersionSignature: Ubuntu 2.6.32-25.45-server 2.6.32.21+drm33.7
Uname: Linux 2.6.32-25-server x86_64
Architecture: amd64
Date: Sun Oct 24 00:59:43 2010
InstallationMedia: Ubuntu-Server 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.2)
SourcePackage: nfs-utils

Revision history for this message
Vidar Hoel (vidar-hoel) wrote :
tags: added: udd-find
Changed in nfs-utils (Debian):
status: Unknown → Confirmed
Changed in nfs-utils (Debian):
status: Confirmed → Fix Released
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.