From owner-freebsd-fs@freebsd.org Fri Aug 14 10:17:20 2015 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 747979B8D25 for ; Fri, 14 Aug 2015 10:17:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 605C31319 for ; Fri, 14 Aug 2015 10:17:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t7EAHKFU074710 for ; Fri, 14 Aug 2015 10:17:20 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 161424] [nullfs] __getcwd() calls fail when used on nullfs mount Date: Fri, 14 Aug 2015 10:17:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 8.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: fullermd@over-yonder.net X-Bugzilla-Status: In Progress X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2015 10:17:20 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=161424 fullermd@over-yonder.net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fullermd@over-yonder.net --- Comment #9 from fullermd@over-yonder.net --- I've just run into what looks like this (after lots of tracking and puzzled-looking) myself on a stable/10 system (in a jail, but it happens outside of jails too). What's happening is that, when you're on a nullfs, if you don't have read permissions to all the directories in the path up to the root, it blows up, whereas on a regular FS, it does just fine. e.g., I have a "/thome/matt/tmp/wt". /thome and /thome/matt are root:wheel 751; the tmp/wt dirs are 755. I use www as a convenient user, changing its shell to /bin/sh. % (cd /thome/matt/tmp/wt ; su www -c /bin/pwd) /thome/matt/tmp/wt Yep, that's what it should get. So then I null mount /thome off into /tmp: % mount_nullfs /thome /tmp/th/ Then: % ( cd /tmp/th/matt/tmp/wt ; su www -c /bin/pwd ) pwd: .: Permission denied If I chmod 755 /thome and /thome/matt, then % ( cd /tmp/th/matt/tmp/wt ; su www -c /bin/pwd ) /tmp/th/matt/tmp/wt -- You are receiving this mail because: You are the assignee for the bug.