mounted nfs share, cannot access symlinked files

Bo Berglund bo.berglund at gmail.com
Fri Oct 8 22:53:06 UTC 2021


I have two Ubuntu machines both with usernames "bosse" for my account.
One is a server and on that I have shared the dir ~/www via nfs.

On the server I have symlinked some script files which live in ~/bin into
~/www/scripts for external access.

On the client machine I mount the share into ~/mnt/www

Now I can see the symlinked files on the client machine, but when I try to
access them I get an error "No such file or directory" even though an ls on the
mounted drive's scripts dir shows the script files I want to access also on the
client machine. But they are listed complete with symlinks shown too...

What is going on here?

On both machines ~/ is actually /home/bosse/ and the symlinked files live in
~/bin on the server.
On the client I also have ~/bin, like I do on all of my Linux machines.

Question:
---------
Why is the server symlink shared as a client symlink over nfs?
At least this is what I think is happening since it seems to try accessing the
symlinked file on the *client* machine's ~/bin dir, where it does not exist.

On the server I wanted to make the scripts available to the clients so they
could be easily copied over, but at the same time I did not want there to be
*copies* of the scripts floating around on my server. Hence the symlink
solution.

On the client the /etc/fstab has this line for the mount I am using:

ubuntuserv:/home/bosse/www /home/bosse/mnt/www nfs tcp,noexec,intr 0 0

Is there some flag that will hide symlinks from connected clients?


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list