3 votes

How to fix "chmod" permissions after running "chmod 222 /bin/chmod"?

You can execute a file that lacks execute permission simply by calling its interpreter. Here's a very simple example: $ touch file $ stat -c '%a' file 664 $ echo 'echo hello' > file $ ./file bash: ....
Zanna's user avatar
  • 70.4k

Only top scored, non community-wiki answers of a minimum length are eligible