From owner-freebsd-questions@freebsd.org Mon Jun 25 19:03:55 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88A64101B87E for ; Mon, 25 Jun 2018 19:03:55 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from kicp.uchicago.edu (kicp.uchicago.edu [128.135.20.70]) by mx1.freebsd.org (Postfix) with ESMTP id 32C5389CFB for ; Mon, 25 Jun 2018 19:03:55 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from point.uchicago.edu (point.uchicago.edu [128.135.52.6]) by kicp.uchicago.edu (Postfix) with ESMTP id 4ADE37180AD for ; Mon, 25 Jun 2018 14:03:48 -0500 (CDT) Subject: Re: FreeBSD-11.1 - symbolic links in jails To: freebsd-questions@freebsd.org References: <5c01d3596c548d3bac00e22ff2fcd2a5.squirrel@webmail.harte-lyne.ca> From: Valeri Galtsev Message-ID: Date: Mon, 25 Jun 2018 14:03:47 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <5c01d3596c548d3bac00e22ff2fcd2a5.squirrel@webmail.harte-lyne.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 19:03:55 -0000 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 ++++++++++++++++++++++++++++++++++++++++