[Bug 161424] [nullfs] __getcwd() calls fail when used on nullfs mount

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Aug 14 10:17:20 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=161424

fullermd at over-yonder.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fullermd at over-yonder.net

--- Comment #9 from fullermd at 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.


More information about the freebsd-fs mailing list