ifconfig: cannot open /proc/net/dev in Centos 7 container on RHEL7.3

2.1k views Asked by At

I'm getting this error while running "ifconfig" command in my CentOS 7 container

The error i get is

cannot open /proc/net/dev (Permission Denied)

how to solve this..??? I'm getting this problem in my each container. I give full permission to /proc/net/dev but it's not working

1

There are 1 answers

0
m4r10k On

Without knowing your docker run ... command line it is hard to guess but maybe you will like to add --cap-add=NET_ADMIN to your run command.

From here:

For interacting with the network stack, instead of using --privileged they should use --cap-add=NET_ADMIN to modify the network interfaces.