-su cd root Permission denied

0 votes

Hi Guys,

I have launched one Ubuntu container in my Docker Engine. I tried to run cd command. But it is showing the below error.

jenkins@9cb85416d91f:~$ cd /root/
-su: cd: /root/: Permission denied

How can I solve this error?

Jun 6, 2020 in Docker by akhtar
• 38,260 points
3,581 views

1 answer to this question.

0 votes

Hi@akhtar,

You are trying to run your command using jenkins user. But your jenkins user does not have power to run command. So give sudo power to your jenkins user.

  • Open /etc/sudoers file and write down the below line.
$ vim /etc/sudoers
jenkins   ALL:(ALL)   NOPASSWD: ALL
answered Jun 6, 2020 by MD
• 95,460 points

Related Questions In Docker

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,460 points
13,523 views
0 votes
1 answer

mkdir: cannot create directory '/var/lib/grafana/plugins': Permission denied

Hi@akhtar, You are getting this error because Grafana ...READ MORE

answered Sep 7, 2020 in Docker by MD
• 95,460 points
17,730 views
0 votes
5 answers

denied: requested access to the resource is denied : docker

You need to tag your image before ...READ MORE

answered Jul 27, 2018 in Docker by Kalgi
• 52,350 points
15,058 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,020 points
2,729 views
0 votes
1 answer

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

Hi@akhtar, You may get this error, if you didn't ...READ MORE

answered May 12, 2020 in Docker by MD
• 95,460 points
18,709 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,460 points
6,857 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP