NEED Docker containers to rwx onto VirtualBox shared folders

Scenario:
• I have a USB drive connected to the host (Windows 8.1) computer with 5 folders.
• The guest (Ubuntu Desktop 18.04) has the same 5 folders under /mnt/<dirs>.
• Via VB, I have the shared folders mount-automatically onto each of the 5 folders on the guest. I am able to rwx from the host and guest onto them folders (sudo usermod -aG vboxsf ubuntu)
VB Shared Folder Settings

Situation:
• I am running Docker containers on my guest. The containers need to rwx onto them shared folders. I am not able to as I am getting permissions denied. My PGID/PUID is set to 1000/1000.
• The shared folders are showing as: drwxrwx— 1 root vboxsf 0 Apr 16 22:04 Temp
• I have tried: sudo mount -t vboxsf -o uid=1000,gid=1000 Temp /mnt/Temp

  • That mounts the drive when I don’t have it as ‘Auto Mount’ on the settings screen, and it will give me the drwxrwxrwx on the folders, but still the container will not write into that folder. I did notice the container still download the test ubuntu.iso file onto a /proc/ type folder, which only after rebooting and not having the folders mounted, the /mnt/Temp will have the ubuntu-19.04.iso within.

• I have tried: sudo chmod -R 777 * and it maintain drwxrwx—
• I have tried: sudo chown -hR ubuntu:ubuntu * and it maintains root:vboxsf
• I have tried: sudo chown -hR root:ubuntu * and it maintains root:vboxsf
$ ls -ls

Just can’t get the Deluge container, which has the volumes: - /mnt/Downloads:/downloads and I have the settings on Deluge going to Downloads: /downloads which is the same folder. I am sure I have correct settings, as I have the same exact setup on an Ubuntu Desktop native system; I am trying to move it to a VB

Question:
How can I make it so the containers can rwx onto the shared folders?

Thanks in advance

2 Likes

I have the same question, were you able to find an answer?

Thanks, Brian

Same issue. Help appreciated.
Might symbolic/hard link work?
Thank you.

I was running into this same issue, and set these values on my container:

PUID=0
PGID=999

0 is root
999 is vboxsf (on my machine, anyways. you can get this from cat /etc/groups )

Once those were set, everything started working properly.