Subject: union mount directory permissions
To: None <tech-kern@netbsd.org>
From: Eric Haszlakiewicz <erh@jodi.nimenees.com>
List: tech-kern
Date: 09/27/2004 19:21:52
	I recently setup up some union mounts to easily play around with 
building pkgsrc for multiple different OS versions.  That worked fine
until I tried to build as non-root.  I noticed shadow directory
ownership and permissions don't get set right.  Then I found this
in union_subr.c:

     * policy: when creating the shadow directory in the
     * upper layer, create it owned by the user who did
     * the mount, group from parent directory, and mode
     * 777 modified by umask (ie mostly identical to the
     * mkdir syscall).  (jsp, kb)

uhm.. so, why?  File permissions and ownership are copied.  Shouldn't
directories behave the same?

eric