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?
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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now