determine owner directory permissions from within the directory

From within a directory, how do I determine whether I have write permission for it.

test -w pwd ; echo ?

This doesn't work as it returns false, even though I have write permission.

The current directory is . not pwd. You are trying to test for write permission to a file called pwd in the current directory.

Doh! So I am. The question still stands though -

test -w . ; echo ?

just returns "?" now

Probably found this out already, but:
echo $?

:stuck_out_tongue:

Cheers! It's been a long long day. :frowning: