前言:一次redhat6.5 /etc权限目录问题处理
系统版本
[root@WXPT-WEB1 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
[root@WXPT-WEB1 ~]# uname -a
Linux WXPT-WEB1 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
1 普通用户报错 /etc/profile: Permission denied,而且ll命令 sftp等不可用
chmod +x /etc/profile
ls -al # 发现 /etc/目录 跟别人不一样
drw-------. 103 root root 12288 Feb 5 13:47 etc # 本机etc
drwxr-xr-x. 102 root root 12288 Feb 6 03:39 etc # 别人etc
# 顺手给了个 开始了下面的错误
chmod -R 775 /etc/
chmod -R 777 /etc/
2 Read from socket failed: Connection reset by peer
首先在自己的本机上
1. tailf /var/log/messages 查看打印的日志,发现里面报了ssh_host_rsa_key 文件权限问题。
2.ll /etc/ssh/ssh_host_rsa_key 和其他机器比较权限,原来权限过大导致的,把权限改为600即可从其他机器上ssh到本机。