Since the name of the VM is ubuntu-jammy, am I correct in assuming this is a VM you created? As in, this is not a Snapcraft-managed VM?
running cp command manually inside multipass shell giving the same error
Does the directory you mounted have symlinks to paths outside the mounted directory? Or are their filepaths with insufficient permissions? More details on the symlinks and the files they link to would be useful.
Yes “ubuntu-jammy” is the name of an instance i have created:
multipass launch jammy --name ubuntu-jammy
The source consists from many different packages which were put together for a device BSP release some time ago. The source is from different parties and we do not own some of the sources. I am aware some links point to a non-existing locations and build of that particular components will take care of them.
The expectation is that at least cp command with -d parameter is supposed to copy them as is.
Outside of the instance “cp -r” also works.
Permissions seems to be ok:
As of today, the furthest back you can go is 2024-08-02 with multipass launch https://cloud-images.ubuntu.com/jammy/20240802/jammy-server-cloudimg-amd64-disk-kvm.img for amd64
I’m not sure if that behavior for dangling symlinks is expected or not for Multipass. I would recommend bringing that reproducer to the Multipass forums or Github issues page.
Thanks for pointing to the bug.
I was using --native mount for shared folder, it solved the issue for my build for now.
Also I have noticed multipass was updated yesterday 2024-09-04 to revision 13186.
it may have a fix to the isue. But I did not tested it.