Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jun 2018 14:03:47 -0500
From:      Valeri Galtsev <galtsev@kicp.uchicago.edu>
To:        freebsd-questions@freebsd.org
Subject:   Re: FreeBSD-11.1 - symbolic links in jails
Message-ID:  <cfde43f4-8c18-2b87-4f3c-b39870b8be23@kicp.uchicago.edu>
In-Reply-To: <5c01d3596c548d3bac00e22ff2fcd2a5.squirrel@webmail.harte-lyne.ca>
References:  <5c01d3596c548d3bac00e22ff2fcd2a5.squirrel@webmail.harte-lyne.ca>

next in thread | previous in thread | raw e-mail | index | archive | help


On 06/25/18 11:59, James B. Byrne via freebsd-questions wrote:
> I am curious about the following observed behaviour:
> 
> On the host I see this:
> 
> ll /usr/jails/mx32/etc/a*
> lrwxr-xr-x  1 root  wheel      17 Jun 25 12:45
> /usr/jails/mx32/etc/aliases -> /etc/mail/aliases
> 
> more /usr/jails/mx32/etc/aliases
> # $FreeBSD: releng/11.1/etc/mail/aliases 243752 2012-12-01 15:11:46Z
> rwatson $
> #       @(#)aliases     5.3 (Berkeley) 5/24/90
> #
> . . .
> 
> On the jail I see this:
> 
> ll /etc/alias*
> lrwxr-xr-x  1 root  wheel      17 Jun 25 12:45 /etc/aliases ->
> /etc/mail/aliases

Inside jail this is exactly what I would expect. Namely, leading slash 
is root directory of the jail. This is "filesystem part" of intended 
jail behavior, which you also can call chroot behavior.

And therefore symlink pointing to absolute path is different inside and 
outside of jail.

Valeri

> 
> # $FreeBSD: releng/11.0/etc/mail/aliases 243752 2012-12-01 15:11:46Z
> rwatson $
> # @(#)aliases 5.3 (Berkeley) 5/24/90
> # mx32
> #
> . . .
> 
> 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.
> 
> 

-- 
++++++++++++++++++++++++++++++++++++++++
Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247
++++++++++++++++++++++++++++++++++++++++



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cfde43f4-8c18-2b87-4f3c-b39870b8be23>