Permission denied when trying to write to file from a view
问题 I've created a chat for this question: here I have a view that attempts to execute f = open('textfile.txt', 'w') but on my live server this brings up the error [Errno 13] Permission denied: 'textfile.txt' . My file structure is as follows: - root | - project | - app | - media where the view lives in app . I have tried having textfile.txt live in root, project, app and media all of which have 777 file permissions (owner, group and public can read, write and execute)[*1]. If I change the