I am trying to read the files inside /root folder. But it is showing me the below error.
[myuser@localhost root]$ ls
ls: cannot open directory '.': Permission denied
How can I solve this error?
You got this error because your user does not have permission to read files inside /root folder. But you change the permission by using the below-given command.
$ chmod o+r /root/
I hope this will solve your error.
Hope it helps!
Enroll with Linux training online and learn in detail about Linux.
You have to run this command from your root account. Otherwise, you will get permission denied error.
Run the below command.
$ sudo chmod o+r /root/
Check if you're providing the correct ...READ MORE
The help command is limited and it ...READ MORE
You can use this:
stat -c "%a %n" ...READ MORE
Hey @Dinesh, this isn't an error, its ...READ MORE
You can use chmod command in your ...READ MORE
You can use chmod command to remove ...READ MORE
Linux system has one command named chown. This ...READ MORE
In Linux, different users have different roles ...READ MORE
You got this error because your user ...READ MORE
File permission 755 means that the directory ...READ MORE
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.