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 chdir Permission

最新文章

  1. ASP.NET中Session的sessionState 4种mode模式
  2. Overload 和Override 的区别
  3. 基本bash命令
  4. Atitit.javascript 实现类的方式原理大总结
  5. hdu 3398
  6. button的type属性
  7. oc语言学习之基础知识点介绍(一):OC介绍
  8. JavaWeb解释一下什么是 servlet?
  9. C++中rand()函数的用法
  10. oracle自己主动维护
  11. NTT板子
  12. 20175212童皓桢 Java实验二-面向对象程序设计实验报告
  13. html5 css选择器。 井号,句号的区别
  14. 解决:org.xml.sax.SAXParseException: 元素类型 "head" 必须由匹配的结束标记 "</head>问题
  15. 封装及调用fetch
  16. ORACLE expdp/impdp详解
  17. Day24-图片验证码----待续
  18. c libghttp ghttp 库使用指南
  19. hive union all使用注意
  20. Team Queue(POJ 2259)

热门文章

  1. PCA主成分分析
  2. noip提高组2011 Mayan游戏
  3. 高效查看MySQL帮助文档的方法 (转)
  4. git命令中带有特殊符号如@
  5. 【Ubuntu 16】 SSH免密码登录
  6. Windbg查看调用堆栈(k*)
  7. EclipseIDE--使用整理
  8. 虚拟机搭建hadoop环境
  9. JavaScript封装一个实用的select控件
  10. XMind入门教程