FreeBSD-11.1 - symbolic links in jails
Valeri Galtsev
galtsev at kicp.uchicago.edu
Mon Jun 25 19:03:55 UTC 2018
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
++++++++++++++++++++++++++++++++++++++++
More information about the freebsd-questions
mailing list