lima-vm / lima-vm/lima

Attempting to mount a writable directory under a read-only directory doesn't work

Open
#873 6 comments 17 reactions 0 assignees View on GitHub
component/sshfs
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

### Description

Lima version `0.11.0` Mac OS Monterey

With the default configuration and adding an additional mount:
```
mounts:
- location: "~"
- location: "/tmp/lima"
writable: true
- location: "~/dev"
writable: true
```

I would always receive the following message when starting the container:
```
INFO[0032] [hostagent] Mounting "/Users/gteu/dev"
INFO[0032] [hostagent] fusermount3: user has no write access to mountpoint /Users/gteu/dev
WARN[0064] [hostagent] failed to confirm whether /Users/gteu/dev [remote] is successfully mounted
```

However, I was able to get the mount to work by making the following modification to lima.yaml (eliminating the home directory read-only mount):
```
mounts:
- location: "~/dev"
writable: true
- location: "/tmp/lima"
writable: true
```

This suggests that the home directory read-only directive prevented the sub directory writable directive. This feels like a bug? I believe I read somewhere that sub-directory mounts should override any parent directory settings. If that behavior is intended, some further documentation to indicate that fact would be helpful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.