How to fix chown ‘permission denied’ issue when using colima on Mac OS X?

Pavel Klindziuk
Dandelion Tutorials
Nov 9, 2023

What is colima?
Colima — container runtimes on macOS (and Linux) with minimal setup.

Issue will be looks like:

postgres  | chown: /var/lib/postgresql/data: Permission denied
postgres exited with code 1

or:

postgres  | chown: changing ownership of '/var/lib/postgresql/data': Permission denied
postgres exited with code 1
  1. Execute command colima stop
  2. Open /Users/{username}/.lima/_config folder
  3. Create override.yaml file with following content:
mountType: 9p
mounts:
- location: "/Users/{username}"
writable: true
9p:
securityModel: mapped-xattr
cache: mmap
- location: "~"
writable: true
9p:
securityModel: mapped-xattr
cache: mmap
- location: /tmp/colima
writable: true
9p:
securityModel: mapped-xattr
cache: mmap

4. Execute command colima delete

5. Execute command colima start --mount-type 9p

Viola!

--

--