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

相關文章
相關標籤/搜索