Docker permissios shared Volume on mac

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

container command:

  • Non-fatal POSTIN scriptlet failure in rpm package while installing rpm in Docker
  • What is a correct/better way to use docker stack deploy with independently updated services?
  • How does docker manage container new files?
  • Electron development on Windows using Docker?
  • Unable to get Maven version from /usr/share/maven/bin/mvn Could not find system variable
  • How to configuring Docker Containers with DHCP addresses local host?
  • 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");

    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?

  • what's the best way to use command line applications in a docker environment?
  • DockerFile : Difference between ADD and COPY
  • Bash not executed after the user logging
  • Adding additional docker node to Shipyard
  • Docker Remote API - Pull/Create image not working
  • docker 1.7 multiple port mapping at run failure
  • One Solution collect form web for “Docker permissios shared Volume on mac”

    Dinghy solve my problem! Works like a charm!

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