现像:
Xshell:\> ssh
Connecting to 192.168.1.10:22...
Connection established.
Escape character is .
Last login: Wed Aug 10 19:57:23 2011 from 192.168.1.101
Could not chdir to home directory /u01/oracle: Permission denied
/usr/bin/xauth: timeout in locking authority file /u01/oracle/.Xauthority
[oracle@localhost /]$ pwd
/
[oracle@localhost /]$
解决方法:
编辑 /etc/sysconfig/selinux -> ../selinux/config,找到这段:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:
SELINUX=disabled
保存,关闭。重启
可以看到正常了:
Xshell:\> ssh
Connecting to 192.168.1.10:22...
Connection established.
Escape character is .
Last login: Wed Aug 10 19:57:39 2011 from 192.168.1.101
/usr/bin/xauth: creating new authority file /u01/oracle/.Xauthority
[oracle@localhost ~]$ pwd
/u01/oracle
[oracle@localhost ~]$
原因:
有时间看看SELinux到底是做什么用?
阅读(6727) | 评论(0) | 转发(0) |