您的位置:首页 > 运维架构 > Linux

同一网段中的两台linux A,B; A机设置文件的权限,B通过mount (mount –t nfs ip:/opt/fs /opt/fs)过载A中的文件,无论A机怎样设置文件的权限,B机都可以访

2013-12-31 15:20 381 查看
Samba 用于linux
和windows 之间的共享,linux端可以设置文件的访问权限,windows相对于linux
是其他组用户

问题:

同一网段中的两台linux A,B; A机设置文件的权限,B通过mount
(mount –t nfs ip:/opt/fs /opt/fs)过载A中的文件,无论A机怎样设置文件的权限,B机都可以访问读写执行
,这是怎么回事?

原因: A中的文件原来设置成了NFS,在/etc/exports中给了同步root的权限。

Nfs 相关命令:

cat /etc/exports

exportfs –ra (使得/etc/exports文件中的所有设置生效)

exportfs –v (查看客户端)

showmount –e ip (查看NFS服务器的共享目录)

mount –t nfs ip:/opt/share/ /mnt/share (挂载命令)

service nfs start(stop/restart/status)

service iptables stop(关闭防火墙)

service xinetd restart(重启tftp)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: