What steps could someone else take to reproduce the issue you’re having?
I’ve installed ghost in a CentOS environment, I understand that this isn’t officially supported. But I got everything working except the upload part. I’ve run ghost doctor but everything checks out fine including file permissions.
Hi @paulopmx! What kind of image are you trying to upload? Also would be good to know the error which 500 is producing on the server side (can be found in the logs, by default stored in content/logs folder).
Hi @naz, thank you for the quick response. I wasn’t able to find an entry for the error on content/logs, but I was able to find an entry in the nginx logs: 2019/05/15 07:02:09 [crit] 6150#0: *5637 open() “/var/lib/nginx/tmp/client_body/0000000029” failed (13: Permission denied), client: 54.239.178.44, server: blog.domain.com, request: “POST /ghost/api/v2/admin/images/upload/ HTTP/1.1”
I’ve already tried setting the folder permission to 777, to no avail.
FYI, I’m uploading publication icon and logo using png files, which works by the way on my local installation.
Are you using any storage adapters with your Ghost instance? Which folder are you setting 777 permissions to?
When images are uploaded to the server, apart from standard stoarage folder /content/images, uploader uses OS’s default temporary file storage folder - /tmp is CentOS case (or any other POSIX system). Could be worth checking if there’s anything funky going on with permissions there
@naz, I’ve figured it out. Hopefully this will be helpful to other CentOS users, but I didn’t just to give permission to the /tmp folder but have to include the parent. In this case: /var/lib/nginx/