Exportfs ignores no_root_squash option when the default is root_squash, and vice versa

Bug #1789687 reported by agenkin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nfs-utils (Ubuntu)
New
Undecided
Unassigned

Bug Description

If I specify "root_squash" as the default option for an export, and
try to except one host by specifying "no_root_squash" for just that,
it does not work. The directory is exported with root_squash for
all hosts. For example, given the following line in /etc/exports:

/s/d5 -rw,sync,no_subtree_check,root_squash 192.168.1.10 192.168.1.11(no_root_squash)

I get:

root@fs1:/etc# exportfs -ra
root@fs1:/etc# exportfs -v |fgrep /s/d5
/s/d5 192.168.1.10(rw,wdelay,root_squash,no_subtree_check,sec=sys,rw,root_squash,no_all_squash)
/s/d5 192.168.1.11(rw,wdelay,root_squash,no_subtree_check,sec=sys,rw,root_squash,no_all_squash)

Note that "root_squash" is specified twice for some reason in the output of
"exportfs -v". Also note that the no_root_squash for 192.168.1.11 did not
take effect.

The inverse is also true. If no_root_squash is specified as the default, then
it is impossible to export to select hosts with root_squash. For example,
given the following line in /etc/exports:

/s/d5 -rw,sync,no_subtree_check,no_root_squash 192.168.1.10 192.168.1.11(root_squash)

root@fs1:/etc# exportfs -ra
root@fs1:/etc# exportfs -v |fgrep /s/d5
/s/d5 192.168.1.10(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,no_root_squash,no_all_squash)
/s/d5 192.168.1.11(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,no_root_squash,no_all_squash)

Note that both hosts are getting no_root_squash.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: nfs-kernel-server 1:1.2.8-9ubuntu12.1
ProcVersionSignature: Ubuntu 4.15.0-32.35~16.04.1-generic 4.15.18
Uname: Linux 4.15.0-32-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
Date: Wed Aug 29 11:51:33 2018
SourcePackage: nfs-utils
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
agenkin (agenkin-p) wrote :
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.