Could not chdir to home directory /home/USER: Permission denied
2024-08-29 18:11:00
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 permissiveYou can check if set correctly
#getenforce
上面就是解决的办法
其实就是修改一下/etc/sysconfig/selinux
将SELINUX修改为permissive
如果不想重启机器来使配置起作用,可以直接执行
setenforce permissive
如果没有实现,先确定一下是否是root权限
This entry was posted in Linux and tagged chdir Permission
最新文章
- ASP.NET中Session的sessionState 4种mode模式
- Overload 和Override 的区别
- 基本bash命令
- Atitit.javascript 实现类的方式原理大总结
- hdu 3398
- button的type属性
- oc语言学习之基础知识点介绍(一):OC介绍
- JavaWeb解释一下什么是 servlet?
- C++中rand()函数的用法
- oracle自己主动维护
- NTT板子
- 20175212童皓桢 Java实验二-面向对象程序设计实验报告
- html5 css选择器。 井号,句号的区别
- 解决:org.xml.sax.SAXParseException: 元素类型 ";head"; 必须由匹配的结束标记 ";<;/head>;问题
- 封装及调用fetch
- ORACLE expdp/impdp详解
- Day24-图片验证码----待续
- c libghttp ghttp 库使用指南
- hive union all使用注意
- Team Queue(POJ 2259)