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.sshFor server could not be rebooted:
#setenforce permissivepostYou can check if set correctly
#getenforceurl
上面就是解决的办法spa
其实就是修改一下/etc/sysconfig/selinuxorm
将SELINUX修改成permissiveserver
若是不想重启机器来使配置起做用,能够直接执行ci
setenforce permissive
若是没有实现,先肯定一下是不是root权限