NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/42513: permission denied to "cd .."
>Number: 42513
>Category: kern
>Synopsis: permission denied to "cd .."
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 23 21:20:00 +0000 2009
>Originator: Bernd Ernesti
>Release: NetBSD 5.0_STABLE 20092312 1200UTC
>Organization:
>Environment:
System: NetBSD 5.0_STABLE 20092312 1200UTC
Architecture: i386
Machine: i386
>Description:
I had a problem to build a kernel and was flooded with
cd: can't cd to ..
lines until i did a ctrl-c.
The kernel obj directory was outside of the source tree and the obj
dir (below /x/y) was not on the root filesystem:
/dev/wd0a /
/dev/wd0e /x
/dev/wd1e /x/y
Changing to /x/y works but going one directory up cause an error:
$ /x/y> cd ..
..: Permission denied.
A ls -lad from /x showed this:
drwxr-xr-x 28 xx xx 1024 Dec 23 17:03 y
So it should be fine but looking again after unmounting /x/y
showed this for the same directory:
drwx------ 2 xx xx 512 Oct 12 2008 y
Now to the question: Is this a bug or intentional?
IMHO is this a bug and the cd should use the permissions of the
mounted filesystem and not the one from the underlying fs.
>How-To-Repeat:
Alan Barrett suggested this:
replication recipe (run as non-root user with permission to sudo):
( set -x ; sudo mkdir -p /foo/tmp ; sudo chmod 700 /foo/tmp ; ls -ld
/foo/tmp ;
sudo mount_tmpfs -s 10m tmpfs /foo/tmp ; sudo chown "$(id -u)" /foo/tmp
;
ls -ld /foo/tmp ; cd /foo/tmp ; ls -la ; cd .. ; cd / ; sudo umount
/foo/tmp )
>Fix:
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index