Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
umount.nfs4: You are not permitted to unmount
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 2686
Location: de

PostPosted: Sun May 19, 2013 7:57 pm    Post subject: umount.nfs4: You are not permitted to unmount Reply with quote

Hi there,

I guess since the last big system update, I'm not able to unmount a NFSv4 share anymore as user. Mounting as user and unmounting as root works quite well. I'm not the only one with that problem:


It seems, other distros are already fighting a long time against that nfs-monster. I noticed it today for the first time.

The details:
  • Installed NFSv4. Error occurs with the services started via OpenRC but also with Systemd.
  • mounting as user works. For umount you need to have root permissions.
  • In the debian-bugs, they write something of compiling nfs-comming with libmount. Such a USE-Flag doesn't exist at least for nfs-utils
  • Also the mention, that the mount data should be available in /run/mount/utab. That file exists on my computer but is empty.


The configs:
- Client -
/etc/fstab:
miniding:/home_myuser  /home/myuser/miniding   nfs4    noauto,users,rw,intr,noatime,nodiratime,hard,rsize=32768,wsize=32768    0 0


- Server -
/etc/exports:

/export             192.168.109.0/24(rw,fsid=0,insecure,no_subtree_check,async)
/export/home_myuser     192.168.109.0/24(rw,nohide,insecure,no_subtree_check,async,all_squash,anonuid=1000,anongid=100)


The error:
Code:
mount miniding            <--- works fine
umount miniding                <--- as user
umount.nfs4: You are not permitted to unmount /home/myuser/miniding
su
umount miniding/               <--- as root: works fine


/etc/mtab:
miniding:/home_myuser /home/myuser/miniding nfs4 rw,noatime,nodiratime,vers=4.0,rsize=32768,wsize=32768,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.109.20,local_lock=none,addr=192.168.109.21 0 0


The solution
Just found out, why it isn't working. On the machines, where it isn't working:
ls -al /etc:
lrwxrwxrwx 1 root root      17  6. Mai 18:46 mtab -> /proc/self/mounts


On the on computer, where it's still working:
ls -al /etc:
-rw-r--r-- 1 root root    1582 19. Mai 21:51 mtab


I linked /etc/mtab to /proc/self/mounts in order to switch over to systemd.

Just found out more:
la /proc/self/mounts:
-r--r--r-- 1 root root 0 19. Mai 22:00 /proc/self/mounts

So I guess, because the file is written by the kernel, it isn't writeable. And the umount.nfs4 maybe wants to write to mtab? Could that be?

Any idea what's to do here? Just replace the link with the old file?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum