From owner-freebsd-fs@FreeBSD.ORG Mon Jun 5 20:34:29 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 474AC16C676 for ; Mon, 5 Jun 2006 20:34:29 +0000 (UTC) (envelope-from bastiaanpu@welmers.net) Received: from smtp-vbr13.xs4all.nl (smtp-vbr13.xs4all.nl [194.109.24.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA5C543D58 for ; Mon, 5 Jun 2006 20:34:27 +0000 (GMT) (envelope-from bastiaanpu@welmers.net) Received: from routeduvel.rembrandtkd.welmers.net (welmers.xs4all.nl [80.126.238.7]) by smtp-vbr13.xs4all.nl (8.13.6/8.13.6) with ESMTP id k55KYP7l008683 for ; Mon, 5 Jun 2006 22:34:26 +0200 (CEST) (envelope-from bastiaanpu@welmers.net) Received: by routeduvel.rembrandtkd.welmers.net (Postfix, from userid 1023) id C1C1814422; Mon, 5 Jun 2006 22:34:32 +0200 (CEST) Date: Mon, 5 Jun 2006 22:34:32 +0200 From: Bastiaan Welmers To: freebsd-fs@freebsd.org Message-ID: <20060605203432.GA21420@routeduvel.rembrandtkd.welmers.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Disclaimer: running NetBSD X-Virus-Scanned: by XS4ALL Virus Scanner Subject: execution from unionfs issue X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2006 20:34:41 -0000 Hi, I was wondering the following behavior from a unionfs mounted tree was normal or a bug: When mounting a tree on a directory as lower layer and I execute a binary from the lower layer, it will create a non-executable copy of the binary file on the upper layer: # mkdir /tmp/bin # mount -t unionfs -o -b /bin /tmp/bin # cd /tmp/bin # ./ls -l .... -r-xr-xr-x 1 root wheel 24232 30 mei 04:06 ls # ./ls -l ./ls: Permission denied # /bin/ls -l .... -rw-r--r-- 1 root wheel 24232 5 jun 22:23 ls # cd / # umount /tmp/bin # ls -l /tmp/bin -rw-r--r-- 1 root wheel 24232 5 jun 22:23 ls using -b or not (inversing upper/lower layer or not) does not matter, without -b same problem (when mounting /tmp/bin on /bin this time). It look likes when executing files it will try to open it read-write or something (for updating access time?) and unionfs creates a new (non-executable) copy on the upper layer. I don't know this is desirable behavior or not in general, to me it isn't at least. (I use it to provide basic userland for jails) I found the "noatime" mount option helps to resolve the problem, but I can't find this in any documentation. I'm using FreeBSD 6.1-RELEASE i386 GENERIC. /Bastiaan