码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-08-12 18:37:57      阅读:242      评论:0      收藏:0      [点我收藏+]

标签:

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

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

 

上面就是解决的办法

其实就是修改一下/etc/sysconfig/selinux

将SELINUX修改为permissive

如果不想重启机器来使配置起作用,可以直接执行

setenforce permissive

如果没有实现,先确定一下是否是root权限

This entry was posted in Linux and tagged  

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

标签:

原文地址:http://www.cnblogs.com/sherlockhomles/p/4724983.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!