Back

File Upload Permissions Issue

  • 0
  • Self Hosted
  • Storage
Tanner Meade
13 Jan, 2024, 20:49

I've got a docker swarm cluster running Appwrite with a shared file system. The appwrite service is on a separate node than the storage service and where files are storage.

When I upload a file that is a bit larger (6MB, probably needs to upload by chunk) it will fail. The logs in the appwrite service say that it got a Permission denied when trying to rename a file from /tmp/swoole.upfile.NliAkB to /storage/uploads/app-.../[where the bucket files are].

When I try to do that myself via docker exec using the mv command on a file I create with touch, I get a can't preserve ownership of '...file': Permission denied error but the file does in-fact get moved because I can docker exec ls /storage/uploads/... and see the file there now.

Has anyone run into this problem before?

TL;DR
Issue: The developer is experiencing a file upload permissions issue when using Appwrite in a Docker swarm cluster with a shared file system. When attempting to upload larger files, the upload fails with a "Permission denied" error, specifically when trying to rename a temporary file to the desired storage location. The developer has tried to manually move files using `docker exec`, but encounters a "can't preserve ownership" error, although the file does get moved. Solution: It appears that Appwrite expects specific permissions for the file system, but the developer is unsure of what those permissions should be. Further investigation and potential adjustments of file system permissions are needed to
Tanner Meade
13 Jan, 2024, 20:52

My current theory is that Appwrite expects the permissions to be a certain way and I don't know what that way is.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more