Access Denied for shared volume on OSX
aarongundel opened this issue · 6 comments
I'm attempting to create a new elasticsearch container with a shared volume on my osx machine (virtualbox host). It doesn't seem to be working; I'm getting the following in my logs.
[2015-09-03 17:37:12,223][INFO ][node ] [Vidar] version[1.7.1], pid[1], build[b88f43f/2015-07-29T09:54:16Z]
[2015-09-03 17:37:12,223][INFO ][node ] [Vidar] initializing ...
[2015-09-03 17:37:12,285][INFO ][plugins ] [Vidar] loaded [], sites []
{1.7.1}: Initialization Failed ...
- ElasticsearchIllegalStateException[Failed to created node environment]
AccessDeniedException[/usr/share/elasticsearch/data/elasticsearch]
I am executing the following vanilla command as per the documentation page...
docker run -d -v "$PWD/esdata":/usr/share/elasticsearch/data elasticsearch
Poking through the issue tracker, it looks like this has something to do with your stepping down the permissions for ES on the container, but I have no ideas on how to mitigate that in my container. Any help would be much appreciated.
There are some possible workarounds mentioned in boot2docker/boot2docker#581.
You could not use the entrypoint script and just run as root; or chown the directory you are mounting from your mac to the user id of the elasticsearch user from the container.
How did you fix this? Seeing the same problem here.
@seagullmouse I found the workarounds above helpful in my particular issue.
Can I ask which workaround you used? cheers
Sheesh; looking back over that I can't blame you for asking; that's a lot to sift through. It's been a while since I approached this; I don't recall the specifics of the fix I used to make this evaporate, unfortunately. It became less important later as my stack shifted and I needed to go down another path. Sorry I can't be of more help.
Yep looks like a bit of a rabbit hole so I thought I would ask. Cheers for your time anyway!