[Unionfs] directory not writeable by root, user process hangs

Klaus Knopper unionfs at knopper.net
Wed Mar 15 11:45:05 EST 2006


Hi Matt,

On Wed, Mar 15, 2006 at 03:12:02PM +0000, djing batt wrote:
> Hello,
> I've been playing around with knoppix and unionfs 1.1.3 and came across the 
> following
> bug. Basically if we have:
>  - an empty rw layer
>  - a ro layer with /home owned by root, but not writeable by anybody (perm 
> 555)
>    and /home/knoppix in it, owned by some user
> if the user tries to write to his /home/knoppix dir, the process hangs.

Funny, I have the same effect on Knoppix 5.0 when creating files (make,
vi) within /usr/src/linux (ro filesystem with witable but empty ramdisk
overlayed), which is writable by the user, but the parent directory is
not. Not with unionfs 1.1.3, but the snapshot from 23-02-2006.

Very annoying. I'm trying to debug this when I'm back from Cebit.

So, it's at least not just me. ;-)

Regards
-Klaus Knopper


> (Note: Changing /home permissions to 755 fixes it in my case)
> 
> i've tried with linux kernel 2.6.13.2 and 2.6.12.
> i can reproduce it with the following commands:
> ---------------------------------------------------------------------
> (assuming a (non root) knoppix user exists)
> as root, in /mnt:
>  mkdir tmp5 tmp6 tmp7
>  mount -t tmpfs -o 'size=5000000' /mnt/tmp5 /mnt/tmp5
>  mount -t tmpfs -o 'size=5000000' /mnt/tmp6 /mnt/tmp6
>  mkdir -p tmp6/home/knoppix
>  chown knoppix: tmp6/home/knoppix
>  chmod 555 tmp6/home
>  mount -o remount,ro tmp6
>  mount -t unionfs -o 'dirs=/mnt/tmp5=rw:/mnt/tmp6=ro' /mnt/tmp7 /mnt/tmp7
> 
> as knoppix user:
>  touch /mnt/tmp6/home/knoppix/foo
>  [hangs, can't be killed]
> ---------------------------------------------------------------------
> 
> Also i've had weird results when using unionfs on directories that are not 
> the root of
> their filesystem (that was for the ro layer in my case). It doesn't work 
> most of the time
> (EROFS when trying to write to union basically).
> I initially thought this was legal since the module doesn't complain and the
> documentation doesn't state otherwise...
> 
> Cheers
> -- Matt
> 
> _________________________________________________________________
> MSN Messenger : discutez en direct avec vos amis ! 
> http://www.msn.fr/msger/default.asp
> 
> _______________________________________________
> unionfs mailing list
> unionfs at mail.fsl.cs.sunysb.edu
> http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs



More information about the unionfs mailing list