Run an Executable File [Closed]

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
3

Possible things that can prevent execution of files are:

  1. Security modules
  2. mount options
  3. binary files for a different architecture

Security modules

Things like AppArmor or SELinux can prevent executables from paths. This would be logged in the system logs I guess.

Mount options

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.

8

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.

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest