Bugzilla – Bug 353538
mount refuses to mount nfs directories from userspace
Last modified: 2008-05-27 04:38:44 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
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
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.
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 ***
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 !!!
*** This bug has been marked as a duplicate of bug 304318 ***