-bash cd root Permission denied

0 votes

Hi Guys,

I am trying to go inside /root folder with other than the root user. But it is showing me the below error.

[nadim@localhost ~]$ cd /root/
-bash: cd: /root/: Permission denied

How can I solve this error?

Aug 13, 2020 in Linux Administration by akhtar
• 38,260 points
46,236 views

1 answer to this question.

0 votes

Hi@akhtar,

You got this error because your user don't have the execute power of /root folder. So you have to assign execute power to your user. You can use the below command to do so.

$ chmod o+x /root/

It will assign execute power to any user of /root folder.

Hope this answer help you.

To learn more about Linux, enroll in Linux administration course online today.

Thanks.

answered Aug 13, 2020 by MD
• 95,460 points

hey man it says changing permissions of '/root/': operation not permitted 

what to do please help me out

Hey, @There,

You got this error because your user is not the owner of /root folder. So you can't change the permission of your folder other than the root user. You need to switch to your root account and run the commands as shown below.

$ su - root
$ chmod o+w /root

I hope this will solve your error.

Related Questions In Linux Administration

0 votes
1 answer

ssh :: Permission denied

Hey @Vinod,  Check if you're providing the correct ...READ MORE

answered Apr 2, 2019 in Linux Administration by Kalgi
• 52,350 points
2,830 views
+1 vote
3 answers
–1 vote
1 answer

How to get octal file permission in linux?

You can use this: stat -c "%a %n" ...READ MORE

answered Jan 3, 2019 in Linux Administration by Omkar
• 69,220 points
2,609 views
0 votes
1 answer

How to take input from user in bash script?

You can use if-else branch to check ...READ MORE

answered Jan 31, 2019 in Linux Administration by Omkar
• 69,220 points
1,146 views
0 votes
1 answer

How to give the read power of a folder in Linux system?

Hi@akhtar, You can use chmod command in your ...READ MORE

answered Aug 13, 2020 in Linux Administration by MD
• 95,460 points
1,118 views
0 votes
1 answer

How to remove write permission from a folder in Linux system?

Hi@akhtar, You can use chmod command to remove ...READ MORE

answered Aug 13, 2020 in Linux Administration by MD
• 95,460 points
3,329 views
0 votes
1 answer

How to change the owner of any folder in Linux system?

Hi@akhtar, Linux system has one command named chown. This ...READ MORE

answered Aug 14, 2020 in Linux Administration by MD
• 95,460 points
1,305 views
0 votes
1 answer

How to add user to a group in Linux system?

Hi@akhtar, In Linux, different users have different roles ...READ MORE

answered Aug 14, 2020 in Linux Administration by MD
• 95,460 points
785 views
0 votes
1 answer

ls: cannot open directory '.': Permission denied

Hi@akhtar, You got this error because your user ...READ MORE

answered Aug 13, 2020 in Linux Administration by MD
• 95,460 points
27,386 views
+2 votes
2 answers

What does file permission 755 mean?

Hi, File permission 755 means that the directory ...READ MORE

answered Dec 9, 2020 in Linux Administration by MD
• 95,460 points
272,471 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