When performed the ES upgrade from a Linux jumpbox docker container, interestingly on one of the regions’ jumpbox I cannot read the mounted folder and got permission denied error. This is related to Selinux setting on docker daemon.
For example, on that jumpbox:
1 | # test is a folder in host user home I want to mount |
First, verify the Selinux mode is enforcing
, you can check by
1 | getenforce |
Then I see the docker daemon Selinux is enabled
, this is why I get permission denied:
1 | sudo docker info | grep Security -A5 |
On other regions’ jumpbox, although the Selinux is enforcing
mode but the docker daemon does not enable it specifically, so I can still read/write mounted foler.
Solutions:
- set Selinux to
permissive
mode and mount as usual
1 | sudo setenforce 0 |
- mount with label
Z
, see this question
From docker official, Configure the selinux label
1 | # test is a folder in host user home I want to mount |