-
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
volume path mount fails due to hosts 755 permission #1267
Comments
I've found the answer for this question. Once I've 777 the host dir, any other folder/file inside has 755
that means, given
and now to the seccond question "shouldn't Kamal do this automatically ? 🤔" - I will dig into kamal source tomorrow and hopefully open a PR. However I'm 90% sure Docker is to blame here in the meantime any helpful note welcome 🙏 one more note - this will not help
as after |
The problem comes from the way kamal handles docker run command. It runs something like that on server by default:
If you specify
These two commands seem to be the same, but they actually do different things. If you specify an absolute path for There were a few edits and attempts to make docker store data where i want, but seems like it is still not possible without plugins. If no one figures it out, adequate PR would be to at least warn user when volume is specified as path. |
New Rails 8.0.0 app (with SQLite Active Storage) with Kamal 2 only thing I change in config/deploy.yml is
volume
as described bellow 👇( + IP addresses and proxy host) deployed to new unconfigured Hetzner VM Ubuntu 22.04Given:
(so I'm mounting folder that does not exist yet on the host
When I run
kamal setup
it failsThis is due to fact that newly created folder on host by Kamal 2
/var/apps/myapp/storage
has 755 permissions on root:root:To solve this I can simply do
chmod 777 -R /var/apps/myapp/storage
and subsequentkamal setup
works 👍✋ However I would like to keep that host folder 755.
So my question is: what folder permission or user:group owner should I change for that host folder so the mount works under 755 🤔
Question 2 shouldn't Kamal do this automatically ? 🤔
I've seen something like this in the past working under docker-compose with volumes(independent of Kamal) and it may be related to the fact that
Dockerfile
manages everything under rails:rails user/group and host volume permission is under root:root. Sure, Docker should translate this permission inconsistency but for some to me unknown reason it does not. 🤷♂️BTW This may look like duplicate of #897 except I'm
root
user on the hostThe text was updated successfully, but these errors were encountered: