Windows + VirtualBox + Ubuntu + Docker + Nginx permissions
I have some problem. And I tried to solve this problem but did not find anything.
But I understood that problem in the group: vboxsf
I found the documentation
And create short script and mnt directory in home directory for current user
sharename="Ubuntu1604Docker"sudo mkdir /mnt/$sharename sudo chmod 777 /mnt/$sharename sudo mount -t vboxsf -o uid=1000,gid=1000 $sharename /mnt/$sharename ln -s /mnt/$sharename $HOME/mnt/$sharename
and run this script: $ sudo ./mnt.sh
In mnt directory symlink was created on my shared directory Ubuntu1604Docker with right permissions current username:groupname
script@ubuntu-16:~/mnt$ lltotal 8drwxrwxr-x 2 script script 4096 Apr 29 19:45 ./drwxr-xr-x 10 script script 4096 Apr 29 19:58 ../lrwxrwxrwx 1 script script 21 Apr 29 19:45 Ubuntu1604Docker -> /mnt/Ubuntu1604Docker/
P.S. Sorry for my English
I had the same problem using apache as webserver and solved doing the following:
- First, I added the vboxsf group into my container
$ docker exec addgroup --gid id_of_vboxsf_group
- Then, I added the apache user (www-data, in my case) to the group
$ docker exec usermod -aG vboxsf www-data #(your user can be different)
I was not capable of changing the permissions, so I kind of mapped the same environment (user and group) from host to the docker container.