Bug 353538 - mount refuses to mount nfs directories from userspace
Summary: mount refuses to mount nfs directories from userspace
Status: RESOLVED DUPLICATE of bug 304318
Alias: None
Product: openSUSE 10.3
Classification: openSUSE
Component: Network (show other bugs)
Version: Final
Hardware: Other openSUSE 10.3
: P4 - Low : Normal with 5 votes (vote)
Target Milestone: ---
Assignee: Neil Brown
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-13 17:00 UTC by Elmar Stellnberger
Modified: 2008-05-27 04:38 UTC (History)
0 users

See Also:
Found By: Community of Practice
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elmar Stellnberger 2008-01-13 17:00:53 UTC
usr:~> mount mypoint/
mount.nfs: Operation not permitted

root:~> tail -f -n 0 /var/log/messages
Jan 13 19:23:33 bellagio mountd[5988]: NFS mount of /mnt/myexport attempted from 127.0.0.1
Jan 13 19:23:33 bellagio mountd[5988]: /mnt/myexport has been mounted by 127.0.0.1

root:~> rpm -q nfs-server
nfs-server-2.2beta51-290

/etc/exports:
/mnt/myexport 10.x.x.x(rw,no_root_squash) localhost(ro,insecure,no_root_squash)

/etc/fstab:
localhost:/mnt/myexport /home/usr/mypoint nfs noauto,users 0 0

mount as root suceeds
Comment 1 Elmar Stellnberger 2008-01-13 17:03:39 UTC
If the insecure option is left out in /etc/exports /var/log/messages looks like the following:
root:~> tail -f -n 0 /var/log/messages
Jan 13 19:30:06 bellagio mountd[6269]: NFS mount of /mnt/myexport attempted from 127.0.0.1
Jan 13 19:30:06 bellagio mountd[6269]: NFS request from localhost originated on insecure port, psychoanalysis suggested
Jan 13 19:30:06 bellagio mountd[6269]: Blocked attempt of 127.0.0.1 to mount /mnt/myexport
Comment 2 Neil Brown 2008-01-23 22:18:55 UTC
That is because /sbin/mount.nfs is not installed set-uid.
If you
   chmod u+s /sbin/mount.nfs
as root, then nfs mounts as non-root should work.

I thought we had released an update which fixed this, but I cannot find
any evidence of that.  I'll look into it.
Comment 3 Elmar Stellnberger 2008-02-06 17:53:02 UTC
root:~> ls -l /sbin/mount.nfs
-rwxr-xr-x 1 root root 52204 22. Sep 02:59 /sbin/mount.nfs
root:~> chmod u+s /sbin/mount.nfs
user:~> mount /home/sonsynced
mount.nfs: rpc.statd is not running but is required for remote locking
   Either use "-o nolocks" to keep locks local, or start statd.
root:~> rpc.statd start
user:~> mount /home/sonsynced
*** now it works ***
Comment 4 Elmar Stellnberger 2008-03-28 14:07:00 UTC
similar errors do even exist for Suse10.1:

usr:~> ls -l /.../XXX/
/bin/ls: /.../XXX/: Keine Berechtigung  (not granted)

root:~> ls -l /.../XXX/
... -> ok

> umount /.../XXX/
> ls -ld /.../XXX/
drwxrwxrwx 2 usr users ....

> grep /.../XXX /etc/fstab
>>remote<< >>local<<     nfs             noauto,user     0 0


  Sometimes it does simply refuse access by users although the mount point privileges(file-mode,user&group) as well as server and client side parameters are exactly the same and although the dir has been mounted by the user himself and the server restarted before issueing the mount attempt !!!
Comment 5 Neil Brown 2008-05-27 04:38:44 UTC

*** This bug has been marked as a duplicate of bug 304318 ***