[Bug 214041] Re: NFS mounting hangs instead of returning with permission denied
Bug Watch Updater
214041 at bugs.launchpad.net
Fri Oct 27 02:05:17 UTC 2017
Launchpad has imported 11 comments from the remote bug at
https://bugzilla.redhat.com/show_bug.cgi?id=439807.
If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.
------------------------------------------------------------------------
On 2008-03-31T15:00:10+00:00 Eric wrote:
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)
Reply at: https://bugs.launchpad.net/ubuntu/+source/nfs-
utils/+bug/214041/comments/0
------------------------------------------------------------------------
On 2008-03-31T15:05:49+00:00 Eric wrote:
Correction, after 2 minutes of retrying it will give up. Until recently this
will going up immediately.
Reply at: https://bugs.launchpad.net/ubuntu/+source/nfs-
utils/+bug/214041/comments/1
------------------------------------------------------------------------
On 2008-03-31T15:08:07+00:00 Eric wrote:
I speak engrish goodly.
"Until recently this would give up immediately"
Reply at: https://bugs.launchpad.net/ubuntu/+source/nfs-
utils/+bug/214041/comments/2
------------------------------------------------------------------------
On 2008-03-31T15:13:56+00:00 Jeff wrote:
Created attachment 299729
patch (untested)
This patch should fix it...
Reply at: https://bugs.launchpad.net/ubuntu/+source/nfs-
utils/+bug/214041/comments/3
------------------------------------------------------------------------
On 2008-03-31T15:31:28+00:00 Eric wrote:
The patch works. With it I get:
[root at 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....
Reply at: https://bugs.launchpad.net/ubuntu/+source/nfs-
utils/+bug/214041/comments/4
------------------------------------------------------------------------
On 2008-03-31T22:34:57+00:00 Steve wrote:
So why was SELunix denying the mount?
Reply at: https://bugs.launchpad.net/ubuntu/+source/nfs-
utils/+bug/214041/comments/5
------------------------------------------------------------------------
On 2008-04-01T01:28:14+00:00 Eric wrote:
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...
Reply at: https://bugs.launchpad.net/ubuntu/+source/nfs-
utils/+bug/214041/comments/6
------------------------------------------------------------------------
On 2008-04-15T11:23:14+00:00 Steve wrote:
Fixed in nfs-utils-1.1.2-2
Reply at: https://bugs.launchpad.net/ubuntu/+source/nfs-
utils/+bug/214041/comments/9
------------------------------------------------------------------------
On 2008-05-14T08:28:29+00:00 Bug wrote:
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
Reply at: https://bugs.launchpad.net/ubuntu/+source/nfs-
utils/+bug/214041/comments/29
------------------------------------------------------------------------
On 2009-06-09T23:56:54+00:00 Bug wrote:
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
Reply at: https://bugs.launchpad.net/ubuntu/+source/nfs-
utils/+bug/214041/comments/37
------------------------------------------------------------------------
On 2009-07-15T08:19:47+00:00 Bug wrote:
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.
Reply at: https://bugs.launchpad.net/ubuntu/+source/nfs-
utils/+bug/214041/comments/38
** Changed in: fedora
Importance: Unknown => Low
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to nfs-utils in Ubuntu.
https://bugs.launchpad.net/bugs/214041
Title:
NFS mounting hangs instead of returning with permission denied
Status in nfs-utils package in Ubuntu:
Fix Released
Status in nfs-utils source package in Hardy:
Fix Released
Status in nfs-utils source package in Intrepid:
Fix Released
Status in Debian:
Fix Released
Status in Fedora:
Won't Fix
Bug description:
Binary package hint: nfs-common
Hardy does not properly return Permission denied correctly when
attempting to mount NFS shares that are denied. Instead it hangs for
2 minutes as if the error was a connection timeout.
This error is hardy specific as gutsy properly returned Permission
denied. Following, you will find output from two different machines:
one running Hardy 8.04, the other running Gutsy 7.10. Both are
attempting to mount the very same NFS share on a Solaris 10 server.
Neither machine actually has permission to mount this share. Both
machines *can* mount shares they do have permission for on the same
server.
This is critical as it severely impacts the usefulness of autofs.
------------ Hardy test case ------------------
$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu hardy (development branch)"
$ uname -a
Linux fungus 2.6.24-15-generic #1 SMP Fri Apr 4 03:48:31 UTC 2008 i686 GNU/Linux
$ dpkg -l | grep nfs-common
ii nfs-common 1:1.1.2-2ubuntu2 NFS support files common to client and serve
$ time sudo mount.nfs platinum:/zpool1/vmware tmp
mount.nfs: Connection timed out
real 2m5.071s
user 0m0.000s
sys 0m0.004s
----------------------- Gutsy test case -------------------------
$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.10
DISTRIB_CODENAME=gutsy
DISTRIB_DESCRIPTION="Ubuntu 7.10"
$ uname -a
Linux campaigndialer 2.6.22-14-server #1 SMP Tue Dec 18 08:31:40 UTC 2007 i686 GNU/Linux
$ dpkg -l | grep nfs-common
ii nfs-common 1:1.1.1~git-20070709-3ubuntu1 NFS support files common to client and serve
$ time sudo mount.nfs platinum:/zpool1/vmware tmp
mount.nfs: platinum:/zpool1/vmware failed, reason given by server: Permission denied
real 0m0.016s
user 0m0.000s
sys 0m0.010s
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/214041/+subscriptions
More information about the foundations-bugs
mailing list