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

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

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

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.web

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

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

For server could not be rebooted:
#setenforce permissivepost

You can check if set correctly
#getenforceurl

 

上面就是解决的办法spa

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

将SELINUX修改成permissiveserver

若是不想重启机器来使配置起做用,能够直接执行ci

setenforce permissive

若是没有实现,先肯定一下是不是root权限

This entry was posted in Linux and tagged chdir Permission

相关文章
相关标签/搜索