Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3055981
  • 博文数量: 535
  • 博客积分: 15788
  • 博客等级: 上将
  • 技术积分: 6507
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-07 09:11
文章分类

全部博文(535)

文章存档

2016年(1)

2015年(1)

2014年(10)

2013年(26)

2012年(43)

2011年(86)

2010年(76)

2009年(136)

2008年(97)

2007年(59)

分类: LINUX

2008-09-23 10:57:32

NFS出错,不能挂载
[root@db weblogs]# mount -o rw -t nfs 192.168.0.131:/usr/local/apache/logs/accesslog  /weblogs/web1
mount: mount to NFS server '192.168.0.131' failed: RPC Error: Program not registered.

登陆到131上查看/var/log/message
Sep 23 09:53:46 web1 portmap[21711]: warning: cannot open /etc/hosts.deny: Permission denied
Sep 23 09:53:46 web1 portmap[22049]: connect from 192.168.0.135 to getport(nfs): request from unauthorized host
Sep 23 09:53:46 web1 portmap[21711]: warning: cannot open /etc/hosts.deny: Permission denied
Sep 23 09:53:46 web1 portmap[22050]: connect from 192.168.0.135 to getport(nfs): request from unauthorized host
Sep 23 09:53:46 web1 portmap[21711]: warning: cannot open /etc/hosts.deny: Permission denied
Sep 23 09:53:46 web1 portmap[22051]: connect from 192.168.0.135 to getport(nfs): request from unauthorized host
Sep 23 09:53:46 web1 portmap[21711]: warning: cannot open /etc/hosts.deny: Permission denied
Sep 23 09:53:46 web1 portmap[22052]: connect from 192.168.0.135 to getport(nfs): request from unauthorized host
Sep 23 09:53:46 web1 portmap[21711]: warning: cannot open /etc/hosts.deny: Permission denied
Sep 23 09:53:46 web1 portmap[22053]: connect from 192.168.0.135 to getport(nfs): request from unauthorized host
Sep 23 09:53:46 web1 portmap[21711]: warning: cannot open /etc/hosts.deny: Permission denied
Sep 23 09:53:46 web1 portmap[22054]: connect from 192.168.0.135 to getport(nfs): request from unauthorized host
Sep 23 09:53:48 web1 setroubleshoot:      SELinux is preventing /sbin/portmap (portmap_t) "read" access to hosts.deny (etc_runtime_t).      For complete SELinux messages. run sealert -l d32f9195-edbb-4292-b514-af3ebe8b7cba


[root@web1 accesslog]# setsebool -P portmap_disable_trans=1
查看日志 
[root@web1 accesslog]# tail -f /var/log/messages
Sep 23 09:46:57 web1 portmap[21711]: warning: cannot open /etc/hosts.deny: Permission denied
Sep 23 09:46:57 web1 portmap[21897]: connect from 192.168.0.135 to getport(nfs): request from unauthorized host
Sep 23 09:46:57 web1 portmap[21711]: warning: cannot open /etc/hosts.deny: Permission denied
Sep 23 09:46:57 web1 portmap[21898]: connect from 192.168.0.135 to getport(nfs): request from unauthorized host
Sep 23 09:46:57 web1 portmap[21711]: warning: cannot open /etc/hosts.deny: Permission denied
Sep 23 09:46:57 web1 portmap[21899]: connect from 192.168.0.135 to getport(nfs): request from unauthorized host
Sep 23 09:46:59 web1 setroubleshoot:      SELinux is preventing /sbin/portmap (portmap_t) "read" access to hosts.deny (etc_runtime_t).      For complete SELinux messages. run sealert -l d32f9195-edbb-4292-b514-af3ebe8b7cba
Sep 23 09:46:59 web1 last message repeated 11 times
Sep 23 09:53:15 web1 dbus: Can't send to audit system: USER_AVC avc:  received policyload notice (seqno=3) : exe="?" (sauid=81, hostname=?, addr=?, terminal=?)
Sep 23 09:53:15 web1 setsebool: The portmap_disable_trans policy boolean was changed to 1 by root

看来这样不能解决问题

更改/etc/hosts.allow
添加ALL: 192.168.0.135

重新挂载
[root@db weblogs]# mount -o rw -t nfs 192.168.0.131:/usr/local/apache/logs/accesslog  /weblogs/web1

成功






阅读(6076) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~