I copied executable files which were labeled as executable in the file manager when single-clicking it (example: usbview, lshw-gtk in /usr/bin) from computer to usb then I was able to execute them even when executable permission was disabled.
I tried executing other file extensions as per the list:
https://askubuntu.com/a/174356
But, I wasn't able to execute shared libraries like nethogs (no extension), file extensions .so (runtime object), .a (static library), .elf (executable files not object code files) when executable permission was disabled.
While executing some .o files through the terminal but I got error "cannot execute binary file: Exec format error".
File extensions .exe requires wine executable, .tar requires tar and make shared library (run without ./ as prefix), .deb requires dpkg shared library (run without ./ as prefix). Extension .ko I haven't tried as it is related to drivers and kernel modules.
Basically, as rknichols said execute permission is required when directly executing it. If a file (script/source code, static library, shared library, .bin, .elf, or .so file) can be executed via ./[filename] it can also be executed through the GUI when executable permission is enabled.
Quote:
Originally Posted by michaelk
.bin file indicates a binary file but not necessarily executable.
|
A .bin can be an executable file (Unix Executable File) or something like a binary disc image etc. Source:
https://fileinfo.com/extension/bin
For differentiating between a binary file and binary executable file (or binaries), would you say that if a file is directly executable via command line or GUI then it is a binary executable file else if the binary file requires another program to run it then it is just a binary file? (Example: .jpg is a binary file which requires an image viewer to read/edit it)