Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Sep 2010 07:31:36 -0300 (ADT)
From:      "A. Wright" <andrew@qemg.org>
To:        Bill Tillman <btillman99@yahoo.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: NFS Issue
Message-ID:  <alpine.BSF.2.00.1009070725120.5847@qemg.org>
In-Reply-To: <168438.41481.qm@web36503.mail.mud.yahoo.com>
References:  <168438.41481.qm@web36503.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 6 Sep 2010, Bill Tillman wrote:

> I have two LAN segments with a FreeBSD server on each.
>
> Server A is 10.0.0.254
> Server B is 192.168.0.102
>
> 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.

A.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1009070725120.5847>