Subject: kern/35463: union fs: usermount issue
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <dlagno@rambler.ru>
List: netbsd-bugs
Date: 01/22/2007 12:05:00
>Number: 35463
>Category: kern
>Synopsis: union fs: usermount issue
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: support
>Submitter-Id: net
>Arrival-Date: Mon Jan 22 12:05:00 +0000 2007
>Originator: Denis Lagno
>Release: 4.99.8
>Organization:
>Environment:
NetBSD flam.gado 4.99.8 NetBSD 4.99.8 (FLAM) #0: Sat Jan 20 00:34:40 MSK 2007 dina@flam.gado:/volatile/worksrc/netbsd-current/obj/sys/arch/i386/compile/FLAM i386
>Description:
I have following line in /etc/fstab:
/var/src/repo/netbsd-current/src /var/worksrc/netbsd-current/src union rw,noauto,-b
# stat /var/src/repo/netbsd-current/src
5404 3243524 drwxrwxr-x 24 dina wheel 13209636 512 "Jan 22 14:53:46 2007" "Jan 22 02:02:06 2007" "Jan 22 02:02:54 2007" "Jan 1 03:00:00 1970" 16384 4 0 /var/src/repo/netbsd-current/src
# stat /var/worksrc/netbsd-current/src
5404 2965504 drwxrwxr-x 2 dina wheel 12077760 512 "Jan 22 14:24:30 2007" "Jan 22 14:24:32 2007" "Jan 22 14:24:56 2007" "Jan 1 03:00:00 1970" 16384 4 0 /var/worksrc/netbsd-current/src
# sysctl vfs.generic.usermount
vfs.generic.usermount = 1
However when user (owner of corresponding directories) tries to mount it, he gets:
$ id
uid=1025(dina) gid=333(folk) groups=0(wheel),5(operator),9(wsrc),20(staff),100(users),333(folk),335(audio),336(floppy)
$ mount /var/src/repo/netbsd-current/src
mount_union: "/var/src/repo/netbsd-current/src" is a relative path.
mount_union: using "/volatile/src/repo/netbsd-current/src" instead.
mount_union: /volatile/src/repo/netbsd-current/src on /volatile/worksrc/netbsd-current/src: Operation not permitted
(This worked in netbsd <= 4.99.3)
Superuser can mount:
# mount /var/src/repo/netbsd-current/src
mount_union: "/var/src/repo/netbsd-current/src" is a relative path.
mount_union: using "/volatile/src/repo/netbsd-current/src" instead.
>How-To-Repeat:
>Fix: