T
Twenty2mo ago
c0nvexo

[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.
No description
No description
No description
13 Replies
Prastoin
Prastoin2mo ago
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 .env
c0nvexo
c0nvexoOP2mo ago
oh 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 future
geeky.gent
geeky.gent2w ago
This is still an issue.
Prastoin
Prastoin2w ago
Hello, please what twenty version are you using
geeky.gent
geeky.gent2w ago
Todays*latest
Prastoin
Prastoin2w ago
Please create a new thread
geeky.gent
geeky.gent2w ago
Here under help?
Prastoin
Prastoin2w ago
COnvexo seems to have found a solution
geeky.gent
geeky.gent2w ago
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.
Prastoin
Prastoin2w ago
Agreed
geeky.gent
geeky.gent2w ago
No other container has this issue. So I don't think this should be marked as fixed.
Prastoin
Prastoin2w ago
Please feel free to create a github issue, will have more traction As this is a fix/refactor-request
Prastoin
Prastoin2w ago
GitHub
GitHub - twentyhq/twenty: Building a modern alternative to Salesfor...
Building a modern alternative to Salesforce, powered by the community. - twentyhq/twenty

Did you find this page helpful?