cirruslabs / tart

macOS and Linux VMs on Apple Silicon to use in CI and other automations
https://tart.run
Other
3.65k stars 102 forks source link

Document how to mount the shared directory on Linux at boot time #793

Closed edigaryev closed 2 months ago

edigaryev commented 2 months ago

Resolves https://github.com/cirruslabs/tart/issues/791.

tschiex commented 2 months ago

Thanks.

Currently, every file of the mounted APFS folder, as a virtiofs volume, appears as belonging to the root user in the Linux guest.

Would it be possible to preserve the APFS uid of every file in the Linux guest?

edigaryev commented 2 months ago

Would it be possible to preserve the APFS uid of every file in the Linux guest?

I'm not sure if this is possible, but you can add the user option to the /etc/fstab entry:

-com.apple.virtio-fs.automount /mnt/shared virtiofs rw,relatime 0 0
+com.apple.virtio-fs.automount /mnt/shared virtiofs rw,relatime,user 0 0

And this will change the ownership of files in /mnt/shared to the currently logged-in user.