FreeBSD-11.1 - symbolic links in jails
freebsd at fongaboo.com
Tue Jun 26 17:17:32 UTC 2018
I find nullfs to be the most rock-solid solution for stuff like this,
because it transcends the relatively of jails, chroot, etc. It's like a
wormhole for filesystems. But I believe you can only link two directories,
not two files.
But what if you did this:
mount_nullfs /etc /usr/jails/mx32/host/etc
ln -s /usr/jails/mx32/host/etc/mail/aliases /usr/jails/mx32/etc/aliases
I wonder if that would work?
On Tue, 26 Jun 2018, Erich Dollansky wrote:
> On Mon, 25 Jun 2018 12:59:06 -0400
> "James B. Byrne via freebsd-questions" <freebsd-questions at freebsd.org>
>> I wish to confirm that this is intended behaviour; that a single
>> symbolic link can have differing target files depending whether one is
>> in a jail or not.
> it is even a bit more confusing. When you access the same link from
> outside the jail, it will target really the one in the root directory.
> Symbolic links are always relative to the environment it is used in.
> But they can cross mount points.
> If you want to make a link always pointing to the same thing, you will
> have to use hard links. But you are not able to cross mount points then
> and it opens the doors for software breaking out of the jail.
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions