[SOLVED/WORKAROUND] Error when uploading an image - permission denied mkdir (docker folder bind)
I deployed a docker instance of twenty recently using docker compose via portainer. And i've been having a few issues. One of them is the fact that i can't upload any image, I noticed the cosole shows a permission denied error when trying to make a directory on the data folder.
Just in case the folder is a bind on docker instead of an actual volume. I attached a screenshot of the permissions it has.



13 Replies
Looks like you're not looking in the good folder
.local-storage
and server-local-storage
you might need to define custom local storage path in your .envoh damn you're right!
Thank you! I tought it had to be .local-storage as that's what container points out to
left it as is for that reason, but now it works @Prastoin
now i'm wondering why is it looking at the actual folder name instead of the container folder name
any explanation?
doing some investigation found that the directory
.local-storage
does indeed exist inside the docker container and its properly mapped to my actual folder on the node , but has root permissons while everything else has node permissons
so i assume if i just change ownership to node instead of root, it will work with that folder too
changing the variable to server-local-storage
just created a folder with that name inside the twenty-server folder, and the owner is node
maybe docker compose assigned root user when doing the folder mapping (?)
---
Well i just noticed, I just can't do that, docker mappings pass through the container with the same ownership that docker gives to them,
in theory i should just change ownership to another local user and it should solve it, or just change the folder and map that other one instead, lol
It turns out whatever folder i end up using for it, i cannot bind it into a folder in the host because it transfers root ownership to it, thus it gives the error once again.
Solution/Workaround: it seems like twenty-server doesn't like root owned folders when using folder bind in docker-compose . Solved it by switching the data folder ownership on the host from root to another user and group.
Maybe worth checking for someone else in the futureThis is still an issue.
Hello, please what twenty version are you using
Todays*latest
Please create a new thread
Here under help?
COnvexo seems to have found a solution
The solution is to change the ownership of the folder
I am hosting it on a machine with 24 other containers and changing the ownership and creating a new user is a major pain in the backside.
Agreed
No other container has this issue. So I don't think this should be marked as fixed.
Please feel free to create a github issue, will have more traction
As this is a fix/refactor-request
GitHub
GitHub - twentyhq/twenty: Building a modern alternative to Salesfor...
Building a modern alternative to Salesforce, powered by the community. - twentyhq/twenty