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.

Hi,

Each time I try to write on a general directory (using paramiko sftp): /home/username/ I receive an error.

However if I try to upload a file that is already in the directory /home/username/file.csv the writing is succesful.

I am using sftp.put('<local_file_path>', '<remote_file_path>')

Could you explain why?

In the end the goal is to upload a file (each hour) from a external server to the pythonanywhere server (account) so we can run a python script to change the data in the file.

Thanks in advance for the reply.

What if you name a file on remote, not only directory?

can somebody help to get rid of this error: /home/sanjugohel/optionstrategycalc/optionstrategy/optionapp/schedule_task_greek.py: Permission denied

If you want to run the file directly, you'll need to make it executable with chmod +x /home/sanjugohel/optionstrategycalc/optionstrategy/optionapp/schedule_task_greek.py or modify it so that it uses python to run the file: python /home/sanjugohel/optionstrategycalc/optionstrategy/optionapp/schedule_task_greek.py