I have changed file permission_mode,but I can not run any executable file.
ls -li
chmod a+x file_name
./file_name
sudo ./file_name
I have changed file permission_mode,but I can not run any executable file.
ls -li
chmod a+x file_name
./file_name
sudo ./file_name
Possible things that can prevent execution of files are:
Things like AppArmor or SELinux can prevent executables from paths. This would be logged in the system logs I guess.
Determine the filesystem where the binary is stored (I use df -T ./file_name
and use the first column) and check mount | grep /dev/md2
to see if the noexec option is included
Architecture incompability
I use ldd ts3server_linux_x86
which might respond with
not a dynamic executable
when the file isn't compatible with your system. My shell would respond with
zsh: no such file or directory: ./ts3server_linux_x86
if I try to execute a incompatible binary. Also like in this answer you can check with file ./file_name
what architecture the binary was created at.
If the output of ./file_name
in a shell is empty (i. e. no error messages) then it was executed successfully. The program just happened to not produce any data on stdout or stderr.
namei -lx ./file_name
– muru Nov 28 '16 at 12:53