Keywords: Django - AWS - How to - Permissions
Hello I try to use an automatic code to deal with the user's uploaded file through the form. I write the following lines in views.py, which find a job path for user submitted file
job_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), './static/jobs/', str(job
.id)) # Pass the job dir to the jobs folder
with open('log', 'w') as flog:
But I find the code cannot write any files in the created folder because it is daemon not bitnami. I can log in through SSH and run same command in sh file and generate the file I needed. Does anyone know how to give permission for daemon user to deal with the user submitted code and write new files?