0

I created an empty read-only directory:

mkdir -m 400 ~/Desktop/hello

As per the octal permission, it indicates the directory has read only permission. But contrast to that when I am using the following command the directory was deleted:

rmdir ~/Desktop/hello

How is this possible to delete the directory when it is read only?

ilkkachu
  • 133,243
  • 15
  • 236
  • 397
  • 6
    Does this answer your question? [Why can rm remove read-only files?](https://unix.stackexchange.com/questions/48579/why-can-rm-remove-read-only-files) – Vojtech Trefny Oct 09 '20 at 16:14
  • 1
    See also: [Execute vs Read bit. How do directory permissions in Linux work?](https://unix.stackexchange.com/q/21251/170373) – ilkkachu Oct 09 '20 at 16:18

0 Answers0