I deployed a Django application using nginx, gunicorn, Postgresql. In my application I have a folder:
to store uploading pictures. I use user name gonano. I got message: [Error 13] Permission denied : 'media/photos' when uploading a picture . I notice owner gonano only has read permission on app/media so I use command:
nanobox console web.main
and use chmod u+rwx -R media to change permission for the folder app/media to rwx and I can upload pictures to app/media ok.
Then when I use Nanobox to redeploy again, I see that app/media permission changed back to r. Pictures will not display in my app. If I want to see the picture in app I need to upload one by one again. When I use other folders so I can have read/write permision like /var/gonano/www or /data/var/home/gonanno/media to store pictures, when I use Nanobox to redeploy the media folder is override/delete (the pictures got deleted) so I do not know where I would store my uploading pictures to avoid override by Nanobox when to re-deploy.
I read and see you have Network directory, writable directories, I tried to setup but does not work.
Please let me know where I can store permanently the uploading pictures for application for my uploading pictures to avoid overriden / delete when to re-deploy. Because I do many re deployments and each time Nanobox will delete my uploading pictures. Please give sample code setup that permanently folder with permission read write for user gonano or www-data to use in application.
Thank you for your help.