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權限