NFS Issue

A. Wright andrew at
Tue Sep 7 10:31:38 UTC 2010

On Mon, 6 Sep 2010, Bill Tillman wrote:

> I have two LAN segments with a FreeBSD server on each.
> Server A is
> Server B is
> I setup server A has two drives and I setup a share on drive #2 to be shared via NFS with the both networks. I also made a symlink on drive #2 to a folder on drive #1
> On server B I can nfs_mount the share on server A and see the symlink. But when I try to access the files in the symlink it shows the link is broken, In other words no files show up.
> On server A I can see the files in the symlink folder just fine.

This is expected NFS behaviour:  NFS exports filesystems starting
at a given (exported) mount point.

While there are many reasons for this, think about the security
issues if a user on B could create a symlink on your exported
volume (because the origin of the symlink will make no difference
to the server) to access any file anywhere on A.

If you want both disks 1 and 2 visible, the standard solution
is to export and mount both disks on B.  If the paths (absolute
is easiest, but relative can be made to work) are consistent
between A and the mounted image of A's filesystems on B, then
your symlinks will work -- that is, if you have this kind of
/etc/fstab entry, mounting "/disk1" on A to "/disk1" on B:

 	A:/disk1/somedir		/disk1/somedir
 	A:/disk2		/disk2

then a symlink in /disk1/somedir/link pointing to /disk1/something
will work just fine.


More information about the freebsd-questions mailing list