zoukankan      html  css  js  c++  java
  • 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.

    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  

  • 相关阅读:
    DLX
    逆康托展开
    康托展开
    light oj 1427(ac自动机)
    hdu 2586 (lca-RMQ)
    约瑟夫问题
    C-运算符
    C-数据
    shell-流程控制
    python编程规范-最佳实践
  • 原文地址:https://www.cnblogs.com/sherlockhomles/p/4724983.html
Copyright © 2011-2022 走看看