canonical / canonical/multipass
`multipass mount` w/ ID mapping creates unwritable mountpoints when the source path contains spaces
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 9.2k
- Forks
- 829
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 45
Description
To Reproduce
cd ~mkdir 'path with spaces'multipass launch --name multipass-mount-problem xenialmultipass exec multipass-mount-problem -- mkdir /home/ubuntu/mountpointmultipass mount --verbose --uid-map "$(id --user)":1000 --gid-map "$(id --group)":1000 'path with spaces' multipass-mount-problem:/home/ubuntu/mountpoint
Expected behavior
- Mount operation completed without errors
- Mountpoint is accessible in VM
Current behavior
- Apparmor related errors: console output.log
- Unable to write into the mountpoint in VM:
ubuntu@multipass-mount-problem:~$ cp /etc/fstab mountpoint/ cp: cannot create regular file 'mountpoint/fstab': Operation not permitted
Logs
snap.multipass_star_ journald logs.log
Additional info
- OS: Ubuntu 20.04 amd64
multipass versionmultipass 1.4.0 multipassd 1.4.0multipass info --allName: multipass-mount-problem State: Running IPv4: 10.55.22.247 Release: Ubuntu 16.04.7 LTS Image hash: ac5c214712c4 (Ubuntu 16.04 LTS) Load: 0.00 0.02 0.00 Disk usage: 937.7M out of 4.8G Memory usage: 61.6M out of 992.0M Mounts: /home/brlin/path with spaces => /home/ubuntu/mountpoint UID map: 12345:1000 GID map: 12345:1000
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the listed reproduction commands with a source directory containing spaces and the shown UID/GID mappings. Read the linked console and journald logs while comparing the mount behavior with a path without spaces. Done means the mount completes without AppArmor-related errors and the VM can write to the mountpoint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, ubuntu
- Domain
- infrastructure, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100