Reputation: 3444
I've attempted to mount a nfs network share on another computer that has symlinks in it. When I try t cd into that dir, they are resolved on the local side (so I get a not found error). Is it possible to do this so they are followed on the remote side?
This is on OS X, so there might be another way to do this (AFP perhaps), or creating a OS X Alias (although I don't think the unix subsystem recognises there).
Upvotes: 1
Views: 3616
Reputation: 2434
The easiest way out is to mount the NFS share in the same place as on the system where the symlinks work.
Another way would be to change the symlinks to relative ones, if you have the necessary control. There are reasons why many applications create symlinks with lots of ../../../
prefixes, and this situation is one of them.
If you can't do that, you might be able to finesse it if you don't need 'any random symlink' to work.
For instance, if the symlinks that you want to resolve all point into one or a few specific directories that don't exist on the local side, you can symlink those back to the mounted file system.
Simple example: You've mounted remote:/var/usr
as /mnt/remote-usr
, and you really want the symlinks into /var/usr/myapp
to work: Just symlink var/usr/myapp
to /mnt/remote-usr/myapp
on the local side, and you're set.
Upvotes: 3
Reputation: 24546
Symbolic links know nothing about "local" or "remote" side. They are simply special files containing a path that is automatically interpreted by the operating system when accessed.
Upvotes: 1