patents Posted October 16, 2017 Posted October 16, 2017 One of my web app requires that the file is created for example on: '/home/patents/public_html/mysite/log.txt' but I got PermissionError at /[Errno 13] Permission denied: '/home/patents/public_html/mysite/log.txt' It is understood that it is not enabled for web server. Is there any way I can modify files using python3.6 script? Quote
Krydos Posted October 16, 2017 Posted October 16, 2017 I tested python3.6 django writing to a file on Tommy and it works for me. You have to create the log file manually and give it 666 permissions. 666 means owner, group, and other can read/write from it. You have to remember that django runs as the user nobody not your hosting account user so if you use the default 644 permissions nobody won't have access to write to it. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.