Docker permissios shared Volume on mac

I have a permission problem with my mac and my docker (VirtualBox).

container command:

  • Possible to make incremental checkpoints CRIU
  • How can I find which container(s) have mounted a specific volume?
  • Cannot find module '/parse/cloud/main.js' in Docker Parse Server
  • Haskell installation in docker container using stack failing: too many open files
  • Docker and uPnP
  • Maintaining and supporting container base images
  • docker run --name gbl -p 32770:80 -v /Users/sja/Sites/gbl:/var/www --link mariadb:db --link memcached:cache -td paimpozhil/magento-docker
    

    After that I run a simple php script which create a txt file in my root directory.

    $content = "some text here";
    $fp = fopen($_SERVER['DOCUMENT_ROOT'] . "/myText.txt","wb");
    fwrite($fp,$content);
    fclose($fp);
    

    The script not works because my php file have no permissions to create a new file.

    PHP Warning:  fopen(/var/www/myText.txt): failed to open stream: Permission denied in /var/www/test.php on line 3
    

    My username and group looks like this

    enter image description here

    When I try to change it to root nothing happens

    chown root.root -R . 
    

    enter image description here

    What is wrong with my container and my permissions? It is possible that docker override my user and group because I use a shared folder?

  • Is there an official Docker Engine security notices mailing list or other channel?
  • Nagvis 404 error using Shinken in a Docker container
  • Docker-ized Consul, Zookeeper and Kafka in Amazon-ECS
  • “500 Internal Server Error” when pushing docker images using gcloud and a service account with “Owner” permission
  • docker-compose / wordpress permissions error for volume mount
  • How can I keep container running on Kubernetes?
  • One Solution collect form web for “Docker permissios shared Volume on mac”

    Dinghy solve my problem! Works like a charm!

    https://github.com/codekitchen/dinghy

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.