-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 in Docker by akhtar
• 14,590 points
233 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 by MD
• 32,730 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 in Docker by MD
• 32,730 points
152 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
• 51,890 points
6,603 views
0 votes
1 answer

"Access Denied" Error in Windows

Take ownership of the file or folder ...READ MORE

answered Aug 23, 2018 in Docker by Tyrion anex
• 8,380 points
61 views
0 votes
1 answer
0 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
• 57,530 points
604 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 in Docker by MD
• 32,730 points
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 in Docker by MD
• 32,730 points
297 views