Forums

"Permission denied" when trying to run any .py file in my directory

I'm getting this error seemingly when I run any file in my directory. At first I thought it was an error in the code, so I created a blank "hello.py" file and tried running that, error as well.

14:13 ~ $ /home/dgooden/empty_file.py
bash: /home/dgooden/empty_file.py: Permission denied
14:14 ~ $ /home/dgooden/hello.py
bash: /home/dgooden/hello.py: Permission denied

Does anyone know what might be causing this? I feel like something is wrong with my account. It worked until recently, then between editing the .py file this error popped up

Thank you

You need to make them executable:

chmod +x /path/to/your.file