Forums

Permission denied: You do not have write permissions for directory /home??

trying to add new app with custom domain

when asked to enter path I put in

home/zolinna/newsite/custom.py

what already exists is:

home/madmartin/mysite/flask_app.py

then I get error message as above - what's wrong here?

no worries, this seems to have done the trick:

home/madmartin/zolinna/newsite/custom_app.py

The directory /home is the place where Linux puts the home directories for each user. So, as you are the user MadMartin, you have your home directory in /home/MadMartin, and as I'm the user giles, I have my home directory in /home/giles. (If you're coming from a Windows background, this means that /home is roughly equivalent to C:\Users, and Mac users can see is as being equivalent to /Users.) Because of the way PythonAnywhere's virtualization system works, we can't actually see each others' home directories when we look in /home, but if we could, that's where they would be.

This means that you can't create a directory in /home yourself; consider that the directory /home/zolinna would be the home directory for a user called zolinna.

So, the solution -- as you discovered -- is to keep all of your directories inside your home directory.