How to fix chown ‘permission denied’ issue when using colima on Mac OS X?
Published in
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
- Execute command
colima stop
- Open
/Users/{username}/.lima/_config
folder - 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!