Subject: Re: Union mount question
To: Brendon Costa <email@example.com>
From: Robby Griffin <firstname.lastname@example.org>
Date: 08/28/2007 08:50:23
On Aug 28, 2007, at 00:37, Brendon Costa wrote:
> It was mentioned explicitly in the man page that shadow directories
> that are created are owned by the user who originally did the union
> mount with perms 0777 modified by umask.
The manpage also includes a reasonable use case for union mounts:
mount -t union -o -b /sys $HOME/sys
attaches the system source tree below the sys directory in the user's
home directory. This allows individual users to make private
the source, and build new kernels, without those changes becoming
to other users.
... and that's the only way I've ever actually seen them used. This
would not be possible if shadow directory perms were made to match the
underlying fs, because the system source tree does not normally allow
arbitrary users to write.
I guess you could use something like tar or mtree to create all the
shadow directories up front before doing the union mount.