2

I am following this manual on how to mount an nfs port over an ssh tunnel: https://blogs.oracle.com/shepler/entry/tunneling_nfs_traffic_via_ssh

I need this because I want to mount an nfs partition from a machine that is behind a router with no static IP.

However, when I try and issue the mount command I get:

mount -t nfs -o nfsvers='4,tcp' -o port=3049  127.0.0.1:/mnt/shared /mnt/aaa -v
mount.nfs: timeout set for Mon Mar 16 18:49:14 2015
mount.nfs: trying text-based options 'nfsvers=4,tcp,port=3049,addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs: mount(2): Operation not permitted
mount.nfs: Operation not permitted

What is causing this?
The NFS client mounts fine on the machine I am ssing to, and it not mounted when I issue the port forwarding.
Getting the same error on Debian and Ubuntu.

  • What does exportfs on your server day? Are there ACLs on the export? You might find strace gives you more answers as to exactly what error you're getting. – Sobrique Mar 16 '15 at 21:24
  • Will try, note I managed to get sshfs working so its less urgent – GuySoft Mar 17 '15 at 8:24
  • GuySoft, did you manage to solve this? – dds Dec 16 '15 at 7:01
  • @dds started using sshfs instead. With recent ubuntu it even pops up a dialog to put the password if you have one. Use sshfs -o allow_other -o reconnect -o ServerAliveInterval=15 user@hostname.net:/remote/path /local/path – GuySoft Dec 16 '15 at 9:28
  • Will note that sshfs keeps asking for password from time to time with ksshaskpass. It seems like every upgrade of kubuntu has a different behavior – GuySoft Jul 13 '17 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.