I downloaded a python script from the web and when i try to execute it from bash it throws a exception:
User:python_script user$ ./python_script.py -n some_parameter -b
The output is the following:
-bash: ./python_script.py: Permission denied
the file all ready has: #!/usr/bin/python
at the top of the script. How can i solve this?
You need to add execute permissions like so:
chmod u+x python_script.py
This assumes that the script is owned by you. If it isn't, you might need to change the group/other execute permissions or chown
the file as appropriate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With