AS
Size: a a a
AS
A
S
AS
ОS
A
cp /bin/chmod chmod-test
-rwxr-xr-x 1 root root 64072 Dec 7 11:47 chmod-test
./chmod-test -x ./chmod-test
-rw-r--r-- 1 root root 64072 Dec 7 11:47 chmod-test
/lib/ld-linux.so.2 ./chmod-test 755 ./chmod-test
./chmod-test: error while loading shared libraries: ./chmod-test: wrong ELF class: ELFCLASS64
-rw-r--r-- 1 root root 64072 Dec 7 11:47 chmod-test
A
# file /bin/chmod /lib/ld-2.29.so
/bin/chmod: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, stripped
/lib/ld-2.29.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, with debug_info, not stripped
A
$ file /bin/chmod /lib/i386-linux-gnu/ld-2.23.so
/bin/chmod: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 2.6.32, BuildID[sha1]=2924364415aa2d6e2e32fdc3c31e1bc2fff055f4, stripped
/lib/i386-linux-gnu/ld-2.23.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=784628319b1eebed400e7d74f5a14ed2c656b538, stripped
ОS
A
# ldd /bin/chmod
linux-vdso.so.1 (0x00007ffc5a1de000)
libc.so.6 => /lib64/libc.so.6 (0x00007f2aaecc5000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2aaeef2000)
cp /bin/chmod chmod-test
-rw-r--r-- 1 root root 64072 Dec 7 12:00 chmod-test
./chmod-test -x ./chmod-test
./script1.sh: line 9: ./chmod-test: Permission denied
-rw-r--r-- 1 root root 64072 Dec 7 12:00 chmod-test
/lib64/ld-linux-x86-64.so.2 ./chmod-test 755 ./chmod-test
-rwxr-xr-x 1 root root 64072 Dec 7 12:00 chmod-test
💭П
V