hashbang / shell-server

#! shell server base images, ready to boot and allow user logins.
https://hashbang.sh
MIT License
108 stars 33 forks source link

Restore permission of HOME directory. #127

Closed ghost closed 4 years ago

ghost commented 4 years ago

I made some mistake when trying to set permission of HOME directory:

qdtjvszxc@de1:~$ chmod -rwx ~

Now its permission becomes:

qdtjvszxc@de1:~$ ls -ld ~
d---r-xr-x 1 qdtjvszxc qdtjvszxc 426 Oct 29 03:59 ../qdtjvszxc

When I re-login into my account, it is still a problem:

Could not chdir to home directory /home/qdtjvszxc: Permission denied
fatal: could not create work tree dir '/home/qdtjvszxc/.dotfiles': Permission denied
CRITICAL: Failed to clone your dotfiles from
          https://github.com/hashbang/dotfiles
rm: cannot remove '/home/qdtjvszxc/.dotfiles': Permission denied
-bash: /home/qdtjvszxc/.bash_profile: Permission denied
qdtjvszxc@de1:/$ chmod +rwx .
chmod: cannot access '.': Permission denied

Please provide a way to restore its permission.

daurnimator commented 4 years ago

You should be able to run commands with ssh yourself to fix it e.g. ssh de1.hashbang.sh chmod +rwx .

ghost commented 4 years ago

It's my fault. Actually, chmod +rwx . doesn't help, but chmod +rwx ~ does. Sorry for that.