[SOLVED]cannot access my /home directory even though I am the owner
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[SOLVED]cannot access my /home directory even though I am the owner
Recently I have restored my /home partition from my external HDD. Now my external HDD was NTFS formatted so after restoring the /home partition to an ext4 partition the permissions were all messed up so from Single User mode I had to restore the permissions using the following-:
Code:
cd /home
chown -R sreyan:sreyan sreyan
But when I try to switch my user from root to sreyan I get the following problem-:
Code:
su sreyan
bash: /home/sreyan/.bashrc: Permission denied
sreyan@debian:/root$
Notice that I have got my prompt even after permission denied has showed up.
Now I can't seem to access anything under my /home partition when I user sreyan.
s
Code:
reyan@debian:/root$ ls -la /home/sreyan
ls: cannot access /home/sreyan: Permission denied
Why is this happening ? I clearly changed my ownership why can't I still access it ?
to see the permissions on the directory itself without trying to look inside it. (And yes, "ls -la" still needs to look inside the directory to see the entry for "." .)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.