Can't access home folder
10,646
You just need to chown the directory back to yourself.
sudo chown -R user /home/user
Related videos on Youtube
Author by
user274219
Updated on September 18, 2022Comments
-
user274219 almost 2 years
While installing Matlab, I mistakenly typed
sudo chmod +x ./java
in the home folder.And I got i/o error that you are not allowed to access the home folder. Suddenly everything in my home folder disappeared.
Although the disk shows filled up data. I guess the folder permission need to be changed.
-
sohel4r about 10 yearsfirst see your home folder permission ls -l.if there have't any execute permission then give permission with 744 or u+x;
-
user274219 about 10 yearsls -l does not show anything......should I just type chmod u+x?
-
goo about 10 yearsI question your diagnosis. Simply running
chmod +x ./java
asroot
will not break access to$HOME
. Dols -ld $HOME;echo $HOME
to show$HOME
permissions, and to verify$HOME
makes sense. My$HOME
is mode0700 (rwx------)
.sudo chmod u=rwx,g=,o= $HOME
is my suggestion.sudo chmod u=rwx,g=rx,o= $HOME
to allow group read and search.man chmod
-
user274219 about 10 yearsls -ld shows:dr-xr-xr-x 10 root root 2048 2011-09-23 21:47
-
wjandrea over 6 yearsI agree with waltinator. It doesn't make sense for that command to change ownership and remove write permissions. Do you maybe have a wrapper on
sudo
orchmod
? Also you didn't even need to runchmod
as root, since I assume you're the file owner. (BTW I realize this is an old post -- just commenting for future readers.)
-
-
wjandrea over 6 yearsAccording to the comments, the owner doesn't have write permissions, so OP will also need to run
chmod u+w /home/user
. -
wjandrea over 6 yearsAnd the group ownership was changed to, so instead of just
user
, useuser:
in thechown
command. -
wjandrea over 6 yearsAlso do you need to make it recursive? Aren't there files in the home folder that are supposed to be owned by root, or am I thinking of something else?