8
$ mkdir test
$ chmod 0000 test
$ ls -la | grep test | awk '{print $1}'
d---------.
$ chmod 6000 test
$ ls -la | grep test | awk '{print $1}'
d--S--S---.
$ chmod 0000 test
$ ls -la | grep test | awk '{print $1}'
d--S--S---.
I'm not sure why chmod 0000 test
will not clear all of the permission bits. What am I not getting here? I've tried comparing with a calculator, and they do not match. The same behavior is seen on the server I have ssh'd into, RHEL, and my own machine, Ubuntu. I've been reading about this for a while and spending too much time trying to understand.
I ran into this problem when trying all the symbols for the first octal, having never used chmod with 4 octals before. It does seem to clear the sticky bit, however.