docker-pleroma icon indicating copy to clipboard operation
docker-pleroma copied to clipboard

Unable to upload files - 500 Insternal Server Error

Open JoshBayne opened this issue 3 years ago • 3 comments

I can view posts and my instance is federated properly, however if I try to change my avatar, background or profile banner, the image will not upload and I receive a 500 server error Untitled

I've double checked and my uploads folders are properly configured as far as docker is concerned, even put a test file in via the CLI to make sure it showed on both ends.

JoshBayne avatar Nov 23 '22 16:11 JoshBayne

I think I solved it. Tell me if I did anything that might break something.

I did some research and found another user having a similar issue and it was a problem with the owner of the directory, so what I did was docker exec -it --user root pleroma_web sh and then inside the container I used the commands chown -R /var chown -R /tmp then after a quick ls -l to verify that the command took, I uploaded an avatar and it saved.

Will this cause any issues down the road or am I good to go now?

JoshBayne avatar Nov 23 '22 20:11 JoshBayne

That should work just fine. I believe the underlying issue is that the docker-compose is setting permissions to UID: 1000 and GID: 1000 but the Dockerfile is still using UID:GID 911:911

nemesio65 avatar Dec 02 '22 17:12 nemesio65

I can confirm running chown -R 1000:1000 uploads fixes the image upload problem (only tested profile picture, banner and wallpaper)

comcloudway avatar Dec 17 '22 14:12 comcloudway