- 论坛徽章:
- 0
|
Server:
可以设定的参数主要有以下这些:
rw:可读写的权限;
ro:只读的权限;
no_root_squash:登入到NFS主机的用户如果是ROOT用户,他就拥有ROOT的权限,此参数很不安全,建议不要使用。
root_squash:在登入 NFS 主?C使用分享之目?的使用者如果是 root
all_squash:不管登陆NFS主机的用户是什么都会被重新设定为nobody。
anonuid:将登入NFS主机的用户都设定成指定的user id,此ID必须存在于/etc/passwd中。
anongid:同 anonuid ,但是?成 group ID 就是了!
sync:资料同步写入存储器中。
async:资料会先暂时存放在内存中,不会直接写入硬盘。
insecure 允许从这台机器过来的非授权访问。
例如可以编辑/etc/exports为:
/tmp *(rw,no_root_squash)
/home/public 192.168.0.*(rw) *(ro)
/home/test 192.168.0.100(rw)
/home/linux *.the9.com(rw,all_squash,anonuid=40,anongid=40)
Redhat:
设定好后可以使用以下命令启动NFS:
/etc/rc.d/init.d/portmap start (在REDHAT中PORTMAP是默认启动的)
/etc/rc.d/init.d/nfs start
Suse:
/etc/rc.d/init.d/portmap start
/etc/init.d/nfsserver
Client:
Aix:
If show error as below:
bash-3.00# mount sun:/home/share /home/jliu/testmnt/
mount: 1831-008 giving up on:
sun:/home/share
vmount: Operation not permitted.
Try:
bash-3.00# nfso -o nfs_use_reserved_ports=1
Setting nfs_use_reserved_ports to 1
bash-3.00# mount sun:/home/share /home/jliu/testmnt/
bash-3.00#
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/14556/showart_1797930.html |
|