I'm running a Django server hosted on DigitalOcean using Nginx and Gunicorn. I tried adding a 2MB picture via the admin interface when I get hit with a 403 error. Looking into error.log
indicated permission was denied, as follows:
2017/06/27 01:03:29 [error] 1643#1643: *30 open() "/home/brian/nydkc11/nydkc11/nydkcd11/media/image_main/dtc1.jpg" failed (13: Permission denied), client: 108.29.217.25, server: nydkc11.org, request: "GET /media/image_main/dtc1.jpg HTTP/1.1", host: "nydkc11.org", referrer: "http://nydkc11.org/admin/blog/image/7/change/"
The weirdest thing, however, is that smaller image files work just fine (around 18 kb or so). Anyone know why larger media files may be triggering the problem, and how I should fix it?
I had to set client_max_body_size
to 100M
in my nginx.conf
, if that's a useful thing to know.