mount server:/export /import/ -o context=system_u:object_r:httpd_sys_content_t:s0,fscontext=system_u:object_r:lib_t:s0 With selinux enforcing this will give you an selinux denial and the actual mount syscall returns -EACCES. mount.nfs sleeps (increasingly longer up to 10 seconds) and keeps retrying. One permission denied should be enough to cause mount.nfs to give up. A bit of an strace is below: 2262 mount("paris.rdu.redhat.com:/export/storage", "/storage", "nfs"..., 0, "context=\"system_u:object_r:httpd_sys_content_t:s0\",fscontext=\"system_u:object_r:lib_t:s0\",addr=10.11.231.241"...) = -1 EACCES (Permission denied) 2262 gettimeofday({1206974842, 167191}, NULL) = 0 2262 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 2262 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 2262 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 2262 nanosleep({1, 0}, {1, 0}) = 0 2262 mount("paris.rdu.redhat.com:/export/storage", "/storage", "nfs"..., 0, "context=\"system_u:object_r:httpd_sys_content_t:s0\",fscontext=\"system_u:object_r:lib_t:s0\",addr=10.11.231.241"...) = -1 EACCES (Permission denied) 2262 gettimeofday({1206974843, 206725}, NULL) = 0 2262 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 2262 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 2262 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 2262 nanosleep({2, 0}, {2, 0}) = 0 2262 mount("paris.rdu.redhat.com:/export/storage", "/storage", "nfs"..., 0, "context=\"system_u:object_r:httpd_sys_content_t:s0\",fscontext=\"system_u:object_r:lib_t:s0\",addr=10.11.231.241"...) = -1 EACCES (Permission denied)
Correction, after 2 minutes of retrying it will give up. Until recently this will going up immediately.
I speak engrish goodly. "Until recently this would give up immediately"
Created attachment 299729 [details] patch (untested) This patch should fix it...
The patch works. With it I get: [root@dhcp231-25 ~]# mount paris.rdu.redhat.com:/export/storage /storage/ -o context=system_u:object_r:httpd_sys_content_t:s0,fscontext=system_u:object_r:lib_t:s0 mount.nfs: access denied by server while mounting paris.rdu.redhat.com:/export/storage Which is not technically true. The server didn't deny my, the local selinux policy denied me. But I'm happy with it anyway....
So why was SELunix denying the mount?
In this particular case its because i told it to do something bogus with the mount options. The SELinux denial from the above line is expected and was encountered when I was working on doing so SELinux/NFS testing for other purposes. Historically mount.nfs would kick it back at me instantly but not any more. This is not by any means common, a much more reasonable failure scenario (and one that happened under binary mount options) would be: mount server:/export /import -o context=system_u:object_r:httpd_t:s0 This is invalid but not nearly as strange and contrived as my previous mount command and the user should get EACCES, but instead, after 2 minutes they get: mount.nfs: Connection timed out which does tell the real problem. Even if we let it retry on EACCES for 2 minutes it needs to fail with EACCES. If it pretends it was a timeout problem it will send the user looking at non permission related problems...
Fixed in nfs-utils-1.1.2-2
Changing version to '9' as part of upcoming Fedora 9 GA. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This message is a reminder that Fedora 9 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 9. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '9'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 9's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 9 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.