umask setting changes after cd

Viewed 1258

I've got something odd to report. On my newly configured RHEL5 server my shell is set to /bin/bash I have umask set to 002 in .bashrc.

When I first log in, umask appears to work correctly:

$ touch a
$ ls -l a
-rw-rw-r-- etc.....

if I create another file it works:

$ touch b
$ ls -l b
-rw-rw-r-- etc.....

but... if I change directory (to any directory), then umask gets set back 022:

$ cd /var/www/whatever
$ touch c
$ ls -l c
-rw-r--r-- etc.....

completely bizarre.

Anybody seen anything like this? Can they think of anything to check?

why would the umask setting change after cd'ing?

Thanks,

-Charlie

2 Answers
Related