Recipe to set UID/GID on shared folder
Posted: 4. Aug 2024, 05:40
My problem was that I wanted to mount a shared folder from the host, but with regular user UID/GID instead of root/vboxsf. I couldn't find a recipe on the web, so I wrote my own:
This allows me to login to share files as a normal user between my Host and my Guest Linux machines.
- On the Host, setup the shared folder, e.g. named VBoxJJShare with automount off.
- On the Client, create a directory to mount the shared folder on, e.g. mkdir /media/VBoxJJShare.
- On the Client, add an appropriate entry to /etc/fstab:
Code: Select all
#<file system> <mount point> <type> <options> <dump> <pass> VBoxJJShare /media/VBoxJJShare vboxsf uid=1000,gid=1000 0 0
This allows me to login to share files as a normal user between my Host and my Guest Linux machines.