Permission denied

When I try to run Python app, Komodo IDE generates this error displayed on the screenshot (permission denied returned 126)

Hi @memo, I’ll get the obvious question out of the way first. What are the permissions on the file?

la -la path/to/

Other helpful information:

  • How did you create the file?
  • How are you running the file? If it’s a toolbox run command, share ALL properties you set in it. A screenshot will do that.

Hi @careyh,
First off, Thanks for your response. I actually just got to spot the issue and resolved it.
Somehow, the file Preferences >> Properties >> Attributes >> Execute box is not checked by default, so I have to check it every time I create a new file so that it gains the permission to be executed.
Is there anyway to get the Execute box checked by default for every new file? thanks

Then I have to check the execute box so the file can be executable

Morning @memo,

I’m not sure how that would fix the problem. Please answer the original questions I asked.

Setting the execute permission on a Python file shouldn’t be necessary. Typically you would run the file with the python binary, and therefore not actually “executing” the file, ie in your terminal
python 'day' # Hello world!

As far as I know, on Unix machines by default all files are created without the execute permissions (eg. touch in your terminal). I believe that’s due to the umask setting of the OS.

My guess is that in your run cmd that you’re using to run the python script you’re just calling 'day' and the OS knows to “execute” that file with the Python binary. If thats how you want to run scripts then you either need to change your systems umask to enable execute permission when a file is created or manually set the executer permission. The latter is the norm (rule of least permissions or whatever it is).

Having said ALL of that. You’re using Komodo IDE and likely following instructions for Komodo Edit. Don’t use a Run cmd form your tool box. Use Debug Menu > Run without Debugging, or Ctrl + B to “Run inline” and make your life much much easier.

well, I run the same files on VSCode and they run with no issue.
I also run umask command and it returns 022 which I guess is the expected value.

Hey @memo,

Yep, VS Code uses the Python binary, like Komodo does in the Debugger and Run Inline. As I said, it’s likely you’re Run Command being misconfigured.