From owner-freebsd-current@FreeBSD.ORG Sat Oct 16 17:15:56 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D7BE16A4CE for ; Sat, 16 Oct 2004 17:15:56 +0000 (GMT) Received: from visp.engelschall.com (visp.engelschall.com [195.27.176.148]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0294443D2F for ; Sat, 16 Oct 2004 17:15:55 +0000 (GMT) (envelope-from rse@engelschall.com) Received: by visp.engelschall.com (Postfix, from userid 1005) id 3B51D4CE581; Sat, 16 Oct 2004 19:15:54 +0200 (CEST) Received: by en1.engelschall.com (Postfix, from userid 10000) id 2897BA1841; Sat, 16 Oct 2004 19:09:46 +0200 (CEST) Date: Sat, 16 Oct 2004 19:09:46 +0200 From: "Ralf S. Engelschall" To: Arne Schwabe Message-ID: <20041016170946.GA86123@engelschall.com> References: <20041015201033.GA51887@engelschall.com> <86acumu6dy.fsf@kamino.rfc1149.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86acumu6dy.fsf@kamino.rfc1149.org> User-Agent: Mutt/1.4.2.1i Organization: Engelschall, Germany. X-Web-Homepage: http://www.engelschall.com/ X-PGP-Public-Key: http://www.engelschall.com/ho/rse/pgprse.asc X-PGP-Fingerprint: 00 C9 21 8E D1 AB 70 37 DD 67 A2 3A 0A 6F 8D A5 X-Mailman-Approved-At: Sun, 17 Oct 2004 12:08:04 +0000 cc: freebsd-current@freebsd.org Subject: Re: Linux ABI and permissions to /dev X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: rse@engelschall.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Oct 2004 17:15:56 -0000 On Sat, Oct 16, 2004, Arne Schwabe wrote: > "Ralf S. Engelschall" writes: > > > Under latest RELENG_5 I'm experiencing since recently (about 2-4 weeks I > > think) "permission denied" errors under the Linux ABI on write-access to > > e.g. /dev/null or other devices under /dev: > > > > | $ id > > | uid=10000(rse) gid=10000(rse) groups=10000(rse),5(operator),2001(en) > > | $ ls -l /dev/null > > | crw-rw-rw- 1 root wheel 2, 2 Oct 15 21:39 /dev/null > > | $ echo foo >/dev/null > > | $ ls -l /compat/linux/bin/dev/null > > | ls: /compat/linux/bin/dev/null: No such file or directory > > | $ /compat/linux/bin/bash > > | bash bash2 > > | $ /compat/linux/bin/bash > > | $ ls -l /dev/null > > | crw-rw-rw- 1 root wheel 2, 2 Oct 15 21:40 /dev/null > > | $ echo foo >/dev/null > > | bash: /dev/null: Permission denied > > | $ > > > > Has anybody an idea where to search? There were no changes to devfs > > recently and the recent changes to the Linuxulator seemed harmless to me > > at the first glance... > > is there a /usr/compat/linux/dev directory? If there is try to remove > it, so that it does not shadow the /dev/ direcotry Yes, I have a /compat/linux/dev directory: | # ls -l /compat/linux/dev/ | total 0 | brw-r--r-- 1 root wheel 0, 0x00010002 Sep 17 22:05 had | brw-r--r-- 1 root wheel 0, 0x0001000a Sep 17 22:05 hdb | lrwxr-xr-x 1 root wheel 22 Sep 17 22:05 tty0 -> /compat/linux/dev/tty1 | lrwxr-xr-x 1 root wheel 10 Sep 17 22:05 tty1 -> /dev/ttyv0 | lrwxr-xr-x 1 root wheel 10 Sep 17 22:05 tty10 -> /dev/ttyv9 | lrwxr-xr-x 1 root wheel 10 Sep 17 22:05 tty11 -> /dev/ttyva | lrwxr-xr-x 1 root wheel 10 Sep 17 22:05 tty12 -> /dev/ttyvb | lrwxr-xr-x 1 root wheel 10 Sep 17 22:05 tty2 -> /dev/ttyv1 | lrwxr-xr-x 1 root wheel 10 Sep 17 22:05 tty3 -> /dev/ttyv2 | lrwxr-xr-x 1 root wheel 10 Sep 17 22:05 tty4 -> /dev/ttyv3 | lrwxr-xr-x 1 root wheel 10 Sep 17 22:05 tty5 -> /dev/ttyv4 | lrwxr-xr-x 1 root wheel 10 Sep 17 22:05 tty6 -> /dev/ttyv5 | lrwxr-xr-x 1 root wheel 10 Sep 17 22:05 tty7 -> /dev/ttyv6 | lrwxr-xr-x 1 root wheel 10 Sep 17 22:05 tty8 -> /dev/ttyv7 | lrwxr-xr-x 1 root wheel 10 Sep 17 22:05 tty9 -> /dev/ttyv8 And yes, your guess is right: once I remove it, the problem with my "echo foo >/dev/null" or running "acroread" wents away. But the /compat/linux/dev stuff is created by the "vmware3" port with its... | @exec mkdir -p %%LINUXBASE%%/dev;for n in 0 1 2 3 4 5 6 7 8 9; do ln -s /dev/ttyv$n %%LINUXBASE%%/dev/tty$n;done | @exec ln -s /dev/ttyva %%LINUXBASE%%/dev/tty10 | @exec ln -s /dev/ttyvb %%LINUXBASE%%/dev/tty11 | @exec mknod %%LINUXBASE%%/dev/had b 0 0x00010002 | @exec mknod %%LINUXBASE%%/dev/hdb b 0 0x0001000a ...and unfortunately without at least the /compat/linux/dev/ttyv0 VMWare ultimately fails on startup. So, for running VMWare one really needs this directory. Additionally, the overlaying of /dev with /compat/linux/dev as the "vmware3" port does, definetely _worked_ until about 2 weeks ago. So, the question is what broke it? Ralf S. Engelschall rse@engelschall.com www.engelschall.com