dockerfiles icon indicating copy to clipboard operation
dockerfiles copied to clipboard

Possible to write from OSX mount?

Open tonivdv opened this issue 9 years ago • 13 comments

Hello,

Maybe this is a stupid question, but I was wondering if it's possible to write files from OSX mounts (cifs). When I do it I get permissions denied errors.

Or is it only read-only?

tonivdv avatar Mar 10 '15 19:03 tonivdv

@SvenDowideit any ideas?

tonivdv avatar Mar 18 '15 11:03 tonivdv

are you mounting the share as guest? or using the configured username and password?

SvenDowideit avatar Mar 19 '15 05:03 SvenDowideit

@SvenDowideit Euhm yes with the guest. Not remembering where I found the tuto, but it talked only about guest. Is that the issue?

tonivdv avatar Mar 19 '15 08:03 tonivdv

I was wondering the same. How can I expose a mounted directory to OSX (or Windows) with full read/write permissions (so I can work with a code IDE in this directory)? By default it seems read-only indeed. I'm using a separate data volume container, using the busybox image.

joostfarla avatar Apr 01 '15 15:04 joostfarla

I have the same issue in OSX.

hokkey avatar Apr 01 '15 16:04 hokkey

@SvenDowideit ping...

liverbool avatar Apr 09 '15 12:04 liverbool

I'm having the same issue. I figure it has something to do with not having the right permissions on the folder, which was initially created by a different container.

TimSoethout avatar Apr 28 '15 08:04 TimSoethout

Any update here?

robink avatar May 18 '15 17:05 robink

This is how I worked around the issue: (sorry syntax is of the top of my head. Might not work directly, but hopefully you'll get the gist.)

  • Run an container with override command /bin/bash: docker run -t same-image --interactive --volumes-from=<your other container> /bin/bash
  • Now inside the container your can edit and inspect the file system If you want to get files to the volume use something like python -m SimpleHTTPServer which will start an http-server on <host machine>:8000
  • wget the files in your interactive docker instance (note that wget is not always available on all base images

TimSoethout avatar May 18 '15 19:05 TimSoethout

+1 to this. We've the same problem. The mount is read-only! Anyone has access data to connect not via guest access?

robincle avatar May 21 '15 19:05 robincle

Any update/info about this issue?

matthieupinte avatar May 29 '15 09:05 matthieupinte

For me it was related to the shared folder path. Everything goes well if the shared data is under /home/docker (on the docker host) but I have write issues if the shared folder is directly on /

robink avatar May 29 '15 09:05 robink

Had this issue on Windows 7.

In the end I found it was issues with the data volume permissions.

Steps I did (from tutorial): docker run -v /oradata --name oradata busybox true docker run --rm -v /usr/local/bin/docker:/docker -v /var/run/docker.sock:/docker.sock svendowideit/samba oradata docker run -I -t --volumes-from oradata oracle-4.8 bash

Could connect to the volume in windows with (docker ip)\oradata Tried to create a file and failed. From the interactive container I had, checked the volume and could create a file there and see it on windows.

Check volume access permissions: ls -ltr drwxr-xr-x 2 root root 4096 Jun 3 13:58 oradata

Changed the permission from within the box: chmod 777 /oradata

After that I could write to the volume from where it was mounted in Windows.

sbarnden avatar Jun 03 '15 04:06 sbarnden