A. Check if the home directory permissions are right
1: Problem description
[root@ser6-52 ~]# su – mongodb
su: warning: cannot change directory to /home/mongodb: Permission denied
-bash: /home/mongodb/.bash_profile: Permission denied
2: Cause of error
The home directory has the wrong owner and insufficient permissions
[root@ser6-51 ~]# ls -ld /home/mongodb/
drwx—— 2 504 504 4096 Jul 15 13:50 /home/mongodb/
3: Solution
Modify the owner,modify the permissions
[root@ser6-51 ~]# chown -R mongodb:mongodb /home/mongodb/
[root@ser6-51 ~]# chmod -R 755 /home/mongodb/
[root@ser6-51 ~]# su – mongodb
[mongodb@ser6-51 ~]$
Now you can switch. ls-ld/home/mongodb/
II. View
In fact, it is to use root to modify /etc/sysconfig/selinux, SELINUX=targeted modified to SELINUX=permissive
Third, modify the permissions of the etc directory
chmod -R 755 /etc
Similar Posts:
- E09 Error: sudo: effective uid is not 0, is sudo installed setuid root?
- SU: /BIN/BASH: PERMISSION DENIED [How to Solve]
- The global installation NPM package reported an error and did not have permission
- ZABBIX server startup error resolution
- How to Solve Error: Linux permission denied
- MySQL Error: The server quit without updating PID file [How to Solve]
- Centos Service Cannot Start: Failed to start Login Service Failed to start Install ABRT coredump hook
- SSH login error: “warning: unprotected private key file” problem
- [Solved] zabbix Monitor postgres Error: “sh:psql command not found”
- How to Solve MySQL Startup error: mysql-bin.index not found (Errcode: 13)