Sample Header Ad - 728x90

Is "running a folder" possible in Linux?

1 vote
1 answer
122 views
Is there a philosophy behind running a folder as an executable in linux? user@node main % ls -lash ./bin total 0 0 drwxrwxrwx 2 user staff 64B May 23 21:04 . 0 drwxr-xr-x 6 user staff 192B May 23 21:04 .. user@node main % ./bin zsh: permission denied: ./bin Permission denied implies that it may be allowed. If it's not, then why is it permission denied rather than something like can't run a directory? Or is it just a weird artifact of the API when directories are involved in this way? P.S. I am aware that x flag is *adopted* in the directory context to allow/deny cd-ing into them and long-listing (ls -l) them, this is not what this question is about. P.S.S. In Python, a directory can be treated as a python "executable" if it has a certain file structure inside. (I.e. It's possible to pass a directory instead of a python file to be run by the python interpreter).
Asked by Elijas Dapšauskas (113 rep)
May 23, 2022, 06:30 PM
Last activity: May 23, 2022, 08:39 PM