-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong permissions on volumes #897
Comments
Alex, this is now a problem of Kamal. You cannot change permissions of the volume, while mounting it. All available options can be found here: https://docs.docker.com/storage/volumes/. Maybe you are missing chown command in your Dockerfile |
@igor-alexandrov nope :( I've fixed this issue by another way: $ mkdir ./storage
$ chown -R alec:alec ./storage anyway - it is a workaround, I think |
Maybe I didn't got you right. Are you talking about incorrect permissions on the host machine or in the image? |
@igor-alexandrov on the host machine. I think this issue is connected with #898 because of the similar symptoms. |
Ok, I was wrong in my initial answer. I am not sure that this is a responsibility of Kamal to make sure that the volume exists on the host machine. @djmb what do you think? I make a PR if you will decide to go with it. |
I can confirm this worked for me. I had a similar problem working just with a root user. Rails errored with |
I'm not a Docker expert - hopefully there are some around - but I think this is when you are using any other than the first user on the OS. I believe the default Dockerfile from Rails changes permissions to UID/GID 1000 which by default is Just came across this piece of documentation from a different OSS project: https://github.com/tomsquest/docker-radicale?tab=readme-ov-file#custom-usergroup-id-for-the-data-volume
Hope this helps. Also I solved this by using native docker volumes, e.g:
instead of:
|
This happens when the volumes are not created. Still not being the responsibility of Kamal to create them, it would be nice at least to try to be created as the configured user (if any), and if failed, elevate to root. |
Hey!
There are problem with permissions in kamal. I've added volume
in my
deploy.yml
file and got a problem with permissions:As you see - I've configured kamal to use user
alec
, but volume was created by/forroot
. It cause problems like this:The text was updated successfully, but these errors were encountered: