I had a big mistake
I run this command on a centos 6.8 server:
chmod 0644 -R /* instead of chmod 0644 -R ./*
now directory listing on root directory / and all files failed when I run this command:
chmod 0775 -R /*
I get this error:
bash: /bin/chmod: Permission denied
how can I fix it without reinstall my centos?
/bin/chmod
itself, also see serverfault.com/questions/189627/i-just-did-a-chmod-x-chmod./*
. That's the same thing as just using*
, but more complicated and error prone. Even commands likechmod 0644 -R *
are dangerous, however. See my other answer here: How do I prevent accidental rm -rf /*?