![如何修复奇怪的错误“操作不允许”](https://linux22.com/image/1623055/%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%E5%A5%87%E6%80%AA%E7%9A%84%E9%94%99%E8%AF%AF%E2%80%9C%E6%93%8D%E4%BD%9C%E4%B8%8D%E5%85%81%E8%AE%B8%E2%80%9D.png)
[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