Mongo: Mongo wont start, Centos 7 and chown: changing ownership of '/dev/stdout': Permission denied errors

Created on 22 Mar 2017  路  8Comments  路  Source: docker-library/mongo

When I run the following command on a CentOS 7 machine as root:
$ docker run --name some-mongo -d mongo
I get the following error:
docker logs
chown: changing ownership of '/dev/stdout': Permission denied
chown: changing ownership of '/dev/stderr': Permission denied

I could not find any solution for this. Or why this is happening.

Most helpful comment

I disabled SELinux and works here!

All 8 comments

I also am having the same problem with Red Hat Enterprise Linux Server release 7.3 (Maipo).

I'm also seeing it.

  • RHEL 7 (Maipo)
  • Docker 17.03.0-ce
  • Kernel 3.10.0-514.10.2.el7.x86_64
  • tried using older images (3.2, 3.0) but they fail the same way
  • other containers run just fine
  • running as non-root user that is a member of the docker group
  • did a yum update which brought in a new SE Linux policy and that didn't correct things.

I disabled SELinux and works here!

gustavofc's fix is working for me.

I used these directions to disable SELinux and the MongoDB containers starts for me.

This is a bizarre one. :disappointed:

https://github.com/docker-library/mongo/pull/151 should help!

I am having this same problem also, is this already in the latest mongo images? It seems that docker is still getting the image without this fix. Thanks.

The fix isn't on the Hub quite yet; see
https://github.com/docker-library/official-images/pull/2780.

Was this page helpful?
0 / 5 - 0 ratings