Could not chdir to home directory /home/nomiji: Pe

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Could not chdir to home directory /home/nomiji: Pe相关的知识,希望对你有一定的参考价值。

Could not chdir to home directory /home/nomiji: Permission denied
1.[我们要远程nomiji用户]
[[email protected] ~]# ssh [email protected]
[email protected]‘s password:
Last login: Mon Aug 13 21:18:55 2018 from shell.com
Could not chdir to home directory /home/nomiji: Permission denied
-bash: /home/nomiji/.bash_profile: Permission denied

2.这种报错是对方的用户的家目录 里的.bash_profile 的拥有者和所属组 的问题
【ls -la 我们可以看到.bash_profile的拥有者和所属组 都是cat 而不是nomiji】
[[email protected] nomiji]# ls -la
total 16
drwx------. 2 cat cat 83 Aug 13 21:17 .
drwxr-xr-x. 4 root root 31 Aug 13 21:18 ..
-rw-------. 1 cat cat 5 Aug 13 21:17 .bash_history
-rw-r--r--. 1 cat cat 18 Apr 10 20:53 .bash_logout
-rw-r--r--. 1 cat cat 193 Apr 10 20:53 .bash_profile
-rw-r--r--. 1 cat cat 231 Apr 10 20:53 .bashrc

3.修改家目录的拥有者和所属组
chown -R nomiji:nomiji /home/nomiji/
此时远程登录就OK了

-bash: /home/nomiji/.bash_logout: Permission denied
Connection to 192.168.122.84 closed.
[[email protected] ~]# ssh [email protected]
[email protected]‘s password:
Last login: Mon Aug 13 21:20:32 2018 from shell.com
[[email protected] ~]$ whoami
nomiji

以上是关于Could not chdir to home directory /home/nomiji: Pe的主要内容,如果未能解决你的问题,请参考以下文章

could not connect to server: Connection refused (0x0000274D/10061)

yii框架:CDbConnection failed to open the DB connection: could not find driver的解决的方法

Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK. Look

Could not create local repository at D:maven-repository -> [Help 1][ERROR][ERROR] To see the ful

E: Could not get lock /var/lib/dpkg/lock E: Unable to lock the administration directory (/var/lib/d

E: Could not get lock /var/lib/dpkg/lock E: Unable to lock the administration directory (/var/lib/d