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

来源:互联网 发布:nginx的特点 编辑:程序博客网 时间:2024/06/06 12:59

Samba 用于linuxwindows 之间的共享,linux端可以设置文件的访问权限,windows相对于linux是其他组用户

 

问题:

同一网段中的两台linux A,B; A机设置文件的权限,B通过mountmount –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)

0 0
原创粉丝点击