I just ran the following command in a directory with several files, some owned by root, some by a normal user. I got a strange message:
$ sudo chmod -rwx * chmod: example-file: new permissions are ----w----, not ---------
Why the heck does
chmod refuse to clear all permissions, if a file had group write rights? What is the thought behind this behaviour?
And is there a way to force removing all permissions in one step, without having to execute
sudo chmod g-w * afterwards?