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

djing batt blafooji at hotmail.com
Wed Mar 15 10:12:02 EST 2006


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.

(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




More information about the unionfs mailing list