From owner-freebsd-questions@freebsd.org Thu Mar 2 19:03:52 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2514ECF6906 for ; Thu, 2 Mar 2017 19:03:52 +0000 (UTC) (envelope-from hans@stare.cz) Received: from mx.stare.cz (mx.stare.cz [79.98.77.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6085195D; Thu, 2 Mar 2017 19:03:51 +0000 (UTC) (envelope-from hans@stare.cz) Received: from www.stare.cz (localhost [127.0.0.1]) by www.stare.cz (OpenSMTPD) with ESMTP id 691c329f; Thu, 2 Mar 2017 20:03:46 +0100 (CET) Date: Thu, 2 Mar 2017 20:03:46 +0100 From: Jan Stary To: Matthew Seaman Cc: freebsd-questions@freebsd.org Subject: Re: cpio - Cannot extract through symlink Message-ID: <20170302190346.GA673@www.stare.cz> References: <20170302124428.GA70192@www.stare.cz> <5e3951af-1484-0089-cbe6-2349a77ab43f@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5e3951af-1484-0089-cbe6-2349a77ab43f@FreeBSD.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2017 19:03:52 -0000 On Mar 02 12:56:30, matthew@FreeBSD.org wrote: > On 2017/03/02 12:44, Jan Stary wrote: > > but I would very much like to avoid the unportable --insecure. > > How is /tmp/foo supposed to get copied to $HOME 'via symlink' anyway? > > Am I missing something obvious? > > By default, there is a symlink from /home to /usr/home. I'm not > entirely sure why -- historical reasons, probably. This was a default partitioning, i.e. I let the installer use the entire disk and make up the default partitions. (I haven;t user FreeBSD in years so I took the easy route.) Apparently, that results in one big / partition. The home dirs reside in /usr/home and /home is a symlink to /usr/home. However, my $HOME is /home/hans. So apparently, /home is not a filesystem or a directory, it's a symlink by default. Does anybody know why? > You can mount home directories directly as /home -- this works well, and > it's how the system seems to be expecting things to be laid out. Why does the installer do something else then? Is that intended? > If you're on ZFS, it's fairly easy to just remove the symlink at /home and > then rename ZFSes and play with mountpoints and various other properties > to get /home directly mounted. For UFS, so long as you have a separate > partition for /usr/home, it's doable to re-arrange things in a similar > way, but remember to update /etc/fstab appropriately. I will probably reinstall with a separate /home filesystem, but I still wonder why that is not the default. > Or if you just want your cpio command to work, specify the destination > as '/usr/home/hans' Yes, that works, but is unportable. (And I cannot use $HOME here either.) Thanks for the clue stick Jan