Friday, June 14, 2013

Could not chdir to home directory /home/user: Permission denied -bash: /home/user/.bash_profile: Permission denied

Error : Could not chdir to home directory /home/user: Permission denied -bash: /home/user/.bash_profile: Permission denied

The error opens the bash prompt instead of user prompt when user tries to login using ssh.
Set the home directory permission to 775
$ chmod 775 /home/

It sets the permission of directory /home 775. Do not give recursive permission, it means the permission of directories inside /home (sub-dirs of /home) should not be 775. They should be 700.

/home should be 775 & directories inside /home should be 700.

If you think it will increase the number of hazardous attempts, then try second solution. Although it is about security too. You should disable the SELinux.

1 comment:

  1. This blog was... how do I say it? Relevant!! Finally I've found
    something that helped me. Kudos!

    Feel free to surf to my weblog; Derm Pure

    ReplyDelete