现在的位置: 首页 > 综合 > 正文

NFS操作提示没有权限 Permission denied

2013年10月01日 ⁄ 综合 ⁄ 共 916字 ⁄ 字号 评论关闭

在尝试用NFS建立RAC的时候,出现一个问题 

/etc/exports的配置如下 
/share *(rw,sync) 

其中一个主机查询NFS共享情况 
[root@inthirties03 ~]# exportfs -av 
exporting *:/share 

[root@inthirties04 test]# showmount -e 192.168.47.128 
Export list for 192.168.47.128: 
/share * 

已经关闭了iptables 

但是建立一个目录是出错如下 
[root@inthirties04 ~]# mkdir /test 
[root@inthirties04 ~]# mount 192.168.47.128:/share /test 
[root@inthirties04 ~]# cd /test 
[root@inthirties04 test]# mkdir 1 
mkdir: cannot create directory `1': Permission denied 

提示权限问题

 

这里问题所在是 共享的目录的权限设置问题 

在sever的相应目录上o+w 
[root@inthirties03 /]# chmod g+w /share 
[root@inthirties03 /]# ls /share/ -al 
total 12 
drwxr-xrwx 2 root root 4096 Nov 29 11:56 . 
drwxr-xr-x 25 root root 4096 Nov 29 11:37 .. 

在另一个主机 
[root@inthirties04 test]# mkdir 1 
[root@inthirties04 test]# cat >> 1/log.txt << EOF 
> hello 
> world 
> EOF 

已经成功了

 

抱歉!评论已关闭.