Skip to content

Cannot change the permission of data folder when using boot2docker. #27

@k1xme

Description

@k1xme

In docker_entrypoint.sh, this image will exec chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data to change the ownership of the mounted data folder.

But when I use boot2docker to run this image, I got an error as following:

[2015-05-14 22:02:10,344][INFO ][node ] [Her] version[1.5.2], pid[40], build[62ff986/2015-04-27T09:21:06Z]
[2015-05-14 22:02:10,345][INFO ][node ] [Her] initializing ...
[2015-05-14 22:02:10,356][INFO ][plugins ] [Her] loaded [marvel], sites [marvel]
{1.5.2}: Initialization Failed ...

  • ElasticsearchIllegalStateException[Failed to created node environment]
    AccessDeniedException[/usr/share/elasticsearch/data/elasticsearch]

This is because boot2docker uses vboxfs to share the files between Host Mac and the VM that actually runs docker, and VM cannot change the permission or ownership of the folders on Host Mac.

One workaround is to create the data folder inside the VM, and mount that folder on the container.

I guess using data container might also works, but haven't tried it, and even if it works, it might still have some performance issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions