如何修复奇怪的错误“操作不允许”

如何修复奇怪的错误“操作不允许”
[hadoop@worker-18 tmp]$ ./sysupdate
-bash: ./sysupdate: Operation not permitted
[hadoop@worker-18 tmp]$ chmod +x ./sysupdate
[hadoop@worker-18 tmp]$ ./sysupdate
-bash: ./sysupdate: Operation not permitted
[hadoop@worker-18 tmp]$ sudo ./sysupdate
sudo: unable to execute ./sysupdate: Operation not permitted
[hadoop@worker-18 tmp]$ ls -l ./sysupdate
-rwxrwxrwx 1 hadoop hadoop 1102480 Apr 28 07:48 ./sysupdate
[hadoop@worker-18 tmp]$ stat ./sysupdate
  File: ‘./sysupdate’
  Size: 1102480     Blocks: 2160       IO Block: 4096   regular file
Device: fd01h/64769d    Inode: 402520      Links: 1
Access: (0777/-rwxrwxrwx)  Uid: ( 1001/  hadoop)   Gid: ( 1000/  hadoop)
Access: 2020-05-08 13:02:31.919594048 +0800
Modify: 2020-04-28 07:48:11.962969475 +0800
Change: 2020-05-08 13:02:29.883603300 +0800
 Birth: -
[hadoop@worker-18 tmp]$ cp /usr/bin/ls ./
[hadoop@worker-18 tmp]$ ./ls --version
ls (GNU coreutils) 8.22

Written by Richard M. Stallman and David MacKenzie.
[hadoop@worker-18 tmp]$ chmod --reference=./sysupdate ./ls
[hadoop@worker-18 tmp]$ ls -l ./ls
-rwxrwxrwx 1 hadoop hadoop 117656 May  8 13:02 ./ls
[hadoop@worker-18 tmp]$ ./ls --version
ls (GNU coreutils) 8.22

Written by Richard M. Stallman and David MacKenzie.

[hadoop@worker-18 tmp]$ lsattr ./sysupdate
-------------e-- ./sysupdate

有点奇怪...

但是当我将其上传到我自己的服务器时,我可以执行它:

➜ ~ ./sysupdate --version
screen 2.8.5
 built on Mar  8 2020 with GCC 4.8.5
 features: 64-bit AES

libuv/1.34.0

那么为什么我无法sysupdate在服务器上执行worker-18

操作系统是CentOS Linux release 7.4.1708 (Core)

Linux version 3.10.0-693.2.2.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Tue Sep 12 22:26:13 UTC 2017

相关内容