# executed “chmod 666 ld-2.17.so” - how can i recover?

While trying to learn about how ld-2.17.so works to change the permission of chmod executable itself, and thought if i can change the permission of ld-2.17.so itself.

I ran chmod 666 ld-2.17.so in a test centos 7 machine and after it I can't run any command since most of the commands use ld-2.17.so.

It gives a very general answer but not a specific solution. Is there anywhere in Centos7 i can find ld-2.17.so cache to recover /lib64/ld-2.17.so permission back to normal?

Edit: I have tried to scp this file, /lib64/ld-2.17.so from other machine to affected machine, but I get permission denied error.

while IFS= read -d '' -r  line; do printf "%s\0" "$line"; done > executable-file < /lib64/ld-2.17.so Example: bash-4.2$ ll foo
bash-4.2$while IFS= read -d '' -r line; do printf "%s\0" "$line"; done > foo < /lib64/ld-2.17.so
bash-4.2$./foo Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...] You have invoked `ld.so', the helper program for shared library executables. ... Then you can use it to run chmod: bash-4.2$ ./foo /bin/chmod