Could not chdir to home directory /home/USER: Permission denied

March 16, 2012 by
Filed under: linux, troubleshooting 

We changed the home folder to /data/home/USER.

When I ssh to our centos server. It shows error “Could not chdir to home directory /home/USER: Permission denied”, however loggin ok. I must manually run cd ~ to go to the home directory.

Googled around, and found it is caused by selinux. The solution:

To disabling selinux or change it from enforcing to permissive.
vi /etc/sysconfig/selinux
change SELINUX from enforcing to permissive: SELINUX=permissive, then reboot.

For server could not be rebooted:
#setenforce permissive

You can check if set correctly
#getenforce

Digg This
Reddit This
Stumble Now!
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Comments

3 Comments on Could not chdir to home directory /home/USER: Permission denied

  1. aBro on Tue, 24th Apr 2012 9:35 pm
  2. Thanks !
    worked for me.

  3. guaner on Mon, 3rd Sep 2012 2:58 pm
  4. where is the solution?

  5. guaner on Mon, 3rd Sep 2012 3:33 pm
  6. wonderful, it works, thank you