Re: permissions not honoured by /bin/pwd aka getcwd

From: Jesse Pollard (
Date: Thu Feb 24 2000 - 12:42:40 EST

Anton Ivanov <>:
>strace on linux shows a call to getcwd (3). Return is correct path and no

At least under 2.0 I get the proper response:

bash$ mkdir -p test/test1
bash$ ls -Rl test
total 1
drwxr-xr-x 2 pollard users 1024 Feb 24 11:33 test1

total 0
bash$ cd test/test1
bash$ pwd
bash$ /bin/pwd
bash$ chmod 000 ..
bash$ pwd
bash$ /bin/pwd
/bin/pwd: cannot get current directory: Permission denied

I thought getcwd was doing the I/O to determine the working directory.
To get a _final_ word we'd have to "use the Source". Does strace work
through shared libraries? I don't know that answer either; it seems like
it would.
Jesse I Pollard, II

Any opinions expressed are solely my own.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:10 EST