-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,170 points
2,109 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,160 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,160 points
6,765 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 6, 2020 in Docker by MD
• 95,160 points
3,646 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,310 points
10,422 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,143 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,160 points
5,435 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,160 points
4,054 views