Skip to content

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

Open
@UnoWho247

Description

@UnoWho247

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions