Take the 2-minute tour ×

I have a problem with my server. In my internal network I hand out several network shares using NFSv4 from a Debian Squeeze server to my clients. These shares use the all_squash option because I want all users to be able to read and write to the share without any permission hassle.

But now I also need to grant someone outside my network access to one of these shares. Usually I'd use sshfs for something like this, but I'm running into a problem. All the files are owned by nobody:nobody and have permission 644.

What's the easiest or best way to grant someone from outside my network access to these files? Aside from turning to a complicated setup like a NFS over VPN or something.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

sshfs has -o uid=N -o gid=N and -o umask=xxxx options, as well as -o idmap=[none,user] (for handling how the UID space is mapped). I believe these will do what you need.

The sshfs man page may be of some help, but for details on how these options work you'll probably need to peruse the source code -- the man page is pretty awful...

share|improve this answer
Does that mean that I need to set a valid password for user nobody and have the external client use the credentials for the nobody account to connect? –  Sander Marechal Apr 19 '11 at 19:40
no, but you will need to establish some way for nobody to log in (e.g. via SSH keys) for this to work... –  voretaq7 Apr 19 '11 at 19:42
Okay thanks. I ended up using your suggestion in combination with a new user on the server and the anonuid/anongid options for NFS. –  Sander Marechal Apr 19 '11 at 21:07
add comment

Your Answer


