[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/42513: permission denied to "cd .."
>Synopsis: permission denied to "cd .."
>Arrival-Date: Wed Dec 23 21:20:00 +0000 2009
>Originator: Bernd Ernesti
>Release: NetBSD 5.0_STABLE 20092312 1200UTC
System: NetBSD 5.0_STABLE 20092312 1200UTC
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:
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.
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
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
Main Index |
Thread Index |