cpio - Cannot extract through symlink

Jan Stary hans at stare.cz
Thu Mar 2 19:03:52 UTC 2017

On Mar 02 12:56:30, matthew at 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


More information about the freebsd-questions mailing list