-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Cannot chown or chmod bind mounted files/dirs #83
Comments
Related upstream issue: lima-vm/lima#231 |
I can |
Getting this issue on some popular images, which will attempt to correct host-mounted volume file ownership/permissions during their entrypoint scripts
|
Same problem with mosquitto mqtt broker from dockerhub
|
Is this considered fixed or still outstanding? I'm experiencing this issue with the jekyll/jekyll container, on the HEAD install of colima, lima, qemu. I've tried following these instructions: lima-vm/lima#231 (comment) But have not had any luck. |
@jhogendorn what is your exact situation? Have you tried starting Colima with |
I'm running a jekyll container with docker compose.
Before, i was getting just a big list of chown errors. If i start colima with I got around that by running Then it was failing due to envygeeks/jekyll-docker#335 However, if i setup the gemfile to resolve this, it fails again with So it clearly cant write to the bind mount correctly. i've tried Z and rw modes in the volume as well. |
@jhogendorn I am more confident in 9p than sshfs even though it's slower (provided you do not need symlinks). Does it work if you specify the |
No, it fails because it cannot find the jekyll binary due to how the container is constructed.
Like a lot of poorly made containers, it requires to be run as root user. |
I will note its managed to create a directory structure inside .jekyll-cache, and has some files inside that. Perhaps this is limited to the 'top level' of the mount? It could not create the .jekyll-cache folder, but can write inside it. Gemfile.lock will be top level also. |
The other option is to make the directory writable for other users (not sure if that is ideal for you). This is specific to 9p mount.
|
For sshfs, yes. If the directory is created on the host, it cannot |
chmod 777 does work. thats a rough hack though. I ended up swapping to a different base container, it became evident the issues were many and mostly around that particular container rather than colima etc. Thanks for your help, appreciated. |
colima dosen't support 9p options in mounts. everytime it removes 9p from colima.yaml currently can use lima override.yaml to modify mounts as a fallback |
This is how I solved it. I had to write mounts for
Versions:
|
@bofm Confirmed it fixes for my env too.
|
Hi @jhogendorn which container image did you switch to instead of jekyll/jekyll? I am encountering the exact same error message as you: |
@bofm awesome! finaly fixed my same issue, thx! |
Hi everyone, unfotuntely this is still persisting as a problem across multiple containers combinations: ` ` when starting a container with a volume as following:
the volume folder is available and writeable by the current user docker info:
|
Has anyone been able to solve it? My use case: version: '3'
services:
database:
image: postgis/postgis:13-master
# Required when running on platform other than amd64, like Apple M1/M2:
platform: linux/amd64
volumes:
- ./data/database:/var/lib/postgresql/data
environment:
POSTGRES_USER: 'directus'
POSTGRES_PASSWORD: 'directus'
POSTGRES_DB: 'directus'
directus:
image: directus/directus:10.4.0
ports:
- 8055:8055
volumes:
- ./uploads:/directus/uploads
# If you want to load extensions from the host
# - ./extensions:/directus/extensions
depends_on:
- database
environment:
KEY: '255d861b-5ea1-5996-9aa3-922530ec40b1'
SECRET: '6116487b-cda1-52c2-b5b5-c8022c45e263'
DB_CLIENT: 'pg'
DB_HOST: 'database'
DB_PORT: '5432'
DB_DATABASE: 'directus'
DB_USER: 'directus'
DB_PASSWORD: 'directus'
ADMIN_EMAIL: '[email protected]'
ADMIN_PASSWORD: 'd1r3ctu5' The logs are:
The error is:
Simple example: version: '3'
services:
database:
image: postgres:15.4-alpine
volumes:
- ./data/database:/var/lib/postgresql/data
environment:
POSTGRES_USER: 'directus'
POSTGRES_PASSWORD: 'directus'
POSTGRES_DB: 'directus' Console:
|
Same use case.- Resolved it following @bofm 's comment in three easy steps: 1. Stop colima and create
|
It can't work by path
|
Also worked for me. Thanks! |
This works but I had override.yaml defined at this path as well |
This works |
Another popular software package that's afflicted by this: Supabase. Bug report here. |
Yes! Changing the VM type to macOS Virtualization.Framework as recommended here worked for me:
@Stokestack thanks for this pointer! |
I confirm that changing Colima's VM type worked for me without having to change anything else (so I did not do any of the steps contained in the highest upvoted comment much more above). Thanks @ruslanvs. |
Hello and thank you for the awesome project!
I'm running into an inconsistency between docker for mac and lima.
With docker for mac, I can successfully chown & chmod bind mounted files/dirs within a container.
If I attempt this with colima I get
chown: file.txt: Permission denied
The text was updated successfully, but these errors were encountered: