iptables v1 6 0 can t initialize iptables -F Permission denied you must be root

0 votes

Hi Guys,

I am trying to run iptables program inside docker container, but it shows me the below error.

iptables v1.6.0: can't initialize iptables -F: Permission denied (you must be root)

How can I solve this error?

May 12, 2020 in Docker by akhtar
• 38,170 points
5,503 views

1 answer to this question.

0 votes

Hi@akhtar,

You may get this error, if you didn't give permissions to your container at the time of launching. You can use the below tag at the time of docker run.

$ docker run -it --privileged centos

Hope this will help.

answered May 12, 2020 by MD
• 95,180 points

Related Questions In Docker

0 votes
1 answer

Error saying "E: This command can only be used by root." while installing docker

Try executing the following command: sudo su and ...READ MORE

answered Aug 6, 2019 in Docker by Ahmad
3,126 views
0 votes
1 answer

E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)

Hi@akhtar, To install any software using non root ...READ MORE

answered Jun 6, 2020 in Docker by MD
• 95,180 points
6,844 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,120 points
1,150 views
0 votes
1 answer

-su: cd: /root/: Permission denied

Hi@akhtar, You are trying to run your command ...READ MORE

answered Jun 6, 2020 in Docker by MD
• 95,180 points
2,121 views
0 votes
1 answer

error: permission denied in docker ?

Hi@akhtar, This is because of docker permission for ...READ MORE

answered Mar 23, 2020 in Docker by MD
• 95,180 points
4,077 views