Someone did:
chmod a-x /bin/chmod
marking the chmod programm not executable, how can we repair this, when we can’t execute chmod?
cp /bin/echo /root/echo
cat /bin/chmod > /root/echo
/root/echo a+x /bin/chmod
rsync --chmod=a+x /bin/chmod /root/chmod
/root/chmod a+x /bin/chmod
busybox chmod a+x /bin/chmod
cat > chmod.c
int main() {
char path[] = "/bin/chmod";
chmod(path,00555);
}
^D
gcc chmod.c
./a.out
/lib64/ld-linux-x86-64.so.2 /bin/chmod a+x /bin/chmod
setfacl -m user::rwx /bin/chmod
Found another solution? Let me know in the comments.apt install --reinstall coreutils