This service will be undergoing maintenance at 03:30 UTC, 2016-05-27. It is expected to last about 2 hours

Bug 166746

Summary: selinux stops exportfs from exporting directory via NFS
Product: [Fedora] Fedora Reporter: James Hunt <jamesodhunt>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED NEXTRELEASE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-06 20:55:55 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description James Hunt 2005-08-25 03:33:26 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc4 Firefox/1.0.6

Description of problem:
'exportfs' fails to export any directories when SELinux is in Enforcing mode.

Version-Release number of selected component (if applicable):
nfs-utils-1.0.7-10, kernel-2.6.12-1.1398_FC4, libselinux-1.23.10-2, selinux-policy-targeted-1.25.3-12

How reproducible:

Steps to Reproduce:
1. su -
2. mkdir /tmp/isos
3. chmod 755 /tmp/isos
4. cat >/etc/exports <<EOF
/tmp/isos        *(ro,sync)
5. service iptables stop
6. service portmap start
7. setsebool -P nfs_export_all_ro 1
8. service nfs restart
9. exportfs -av
10. exportfs -v

Actual Results:  No output from 'exportfs -v' (ie the directory '/tmp/isos' has not been NFS-exported).

'/var/log/messages' shows, 

Aug 25 08:24:41 azul kernel: nfsd: last server has exited
Aug 25 08:24:41 azul kernel: nfsd: unexporting all filesystems
Aug 25 08:24:42 azul rpc.idmapd: nfsdreopen: Opening '' failed: errno 2 (No such file or directory)

Expected Results:  The output from 'exportfs -v' should be:

/tmp/isos       <world>(ro,wdelay,root_squash

Additional info:


1. Run, "setenforce Permissive"
2. exportfs -av
3. exportfs -v  # now shows exported directory

This appears to be a known problem, but I could not find a bugzilla on it, hence, here I am! ;-)

The problem is mentioned here: