1、鸟哥的私房菜简体中文 http://linux-vbird.hillwood.cn/linux_server/0330nfs.htm
鸟哥的私房菜繁体中文 http://linux.vbird.org/linux_server/0330nfs.php
2、http://www.l-penguin.idv.tw/article/nfs-automount.htm
3、http://man.ddvip.com/linux/debian/nfs/nfs-conf-4.html
no_root_squash:登入 NFS 主机使用分享目录的使用者,如果是 root 的话,那么对于这个分享的目录来说,他就具有 root 的权限!这个项目『极不安全』,不建议使用!
root_squash:在登入 NFS 主机使用分享之目录的使用者如果是 root 时,那么这个使用者的权限将被压缩成为匿名使用者,通常他的 UID 与 GID 都会变成 nobody 那个系统账号的身份;

IT168:http://server.it168.com/a2008/1016/208/000000208085_1.shtml
  (3)no_root_squash:当登录NFS主机使用共享目录的使用者是root时,其权限将被转换成为匿名使用者,通常它的UID与GID都会变成nobody身份。
  (4)root_squash;如果登录NFS主机使用共享目录的使用者是root,那么对于这个共享的目录来说,它具有root的权限。

哈哈.........
两种截然不同的答案!
man exports:
root_squash
Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other
uids that might be equally sensitive, such as user bin.

no_root_squash
Turn off root squashing. This option is mainly useful for diskless clients.

[root@iZ28wg1kditZ .ssh]# cat /etc/exports
/ *(rw,sync,root_squash) [root@iZ28qsvv5siZ ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa already exists.
Overwrite (y/n)?
[root@iZ28qsvv5siZ ~]# cat /root/.ssh/id_rsa.pub >>/tmp/test/root/.ssh/authorized_keys
-bash: /tmp/test/root/.ssh/authorized_keys: Permission denied
[root@iZ28qsvv5siZ ~]#
[root@iZ28wg1kditZ .ssh]# cat /etc/exports
/ *(rw,sync,no_root_squash) [root@iZ28qsvv5siZ root]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
::ff:::d8:::e5:1b:b7:b5:8f:3c::2c root@iZ28qsvv5siZ
The key's randomart image is:
+--[ RSA ]----+
| o |
| o = . |
| o = B o |
| o * * = |
| . o E o |
| o = . |
| + o |
| o |
| |
+-----------------+
[root@iZ28qsvv5siZ root]# cd ~
[root@iZ28qsvv5siZ ~]# cat .ssh/id_rsa.pub >>/tmp/test/root/.ssh/
id_rsa id_rsa.pub known_hosts
[root@iZ28qsvv5siZ ~]# cat .ssh/id_rsa.pub >>/tmp/test/root/.ssh/authorized_keys
[root@iZ28qsvv5siZ ~]# ssh root@xxx.xxx.xxx.xxx
Last login: Wed Aug :: from xxx.xxx.xxx.xx Welcome to aliyun Elastic Compute Service! [root@iZ28wg1kditZ ~]# ls
axel-2.4-.el5.rf.x86_64.rpm ghost __MACOSX

看来正确的应该是:
no_root_squash:登入 NFS 主机使用分享目录的使用者,如果是 root 的话,那么对于这个分享的目录来说,他就具有 root 的权限!这个项目『极不安全』,不建议使用!
root_squash:在登入 NFS 主机使用分享之目录的使用者如果是 root 时,那么这个使用者的权限将被压缩成为匿名使用者,通常他的 UID 与 GID 都会变成 nobody 那个系统账号的身份。

NFS配置项no_root_squash和root_squash的区别的更多相关文章

  1. nfs配置项在/etc/exports中的说明

    rw 可读写的权限 ro 只读的权限no_root_squash 登入NFS主机,使用该共享目录时相当于该目录的拥有者,如果是root的话,那么对于这个共享的目录来说,他就具有root的权       ...

  2. NFS CIFS SAMBA 的联系和区别

    Common Internet File System, CIFS Server Message Block, SMB Network File System, NFS 在早期网络世界当中,档案数据在 ...

  3. OS + RedHat 6.3 x64 NFS / mount.nfs: access denied by server while mounting

    s Linux mount/unmount命令(转) https://www.cnblogs.com/xd502djj/p/3809375.html 问题2:NFS配置项no_root_squash和 ...

  4. NFS网络文件系统安装配置

    简介 NFS(Network File System)FS是由Sun开发并发展起来的一项用于在不同机器,不同操作系统之间通过网络共享数据.客户端用mount命令把远程的NFS文件系统挂载到本地即可,操 ...

  5. Ubuntu环境下NFS服务器搭建

    看到鸟哥私房菜对NFS的介绍,就想试试玩一下.看起来步骤也很简单. 1.背景名词. NFS(Network File System) 作用:让所有的Unix-like 机器通过网络共享彼此的文件 局限 ...

  6. 配置NFS服务

    1. NFS配置,需要安装哪些包?nfs-utils  和 rpcbind2. 如果不开启rpcbind服务,就启动NFS,会怎么样?如果不开启rpcbind服务,会报错:rpc.nfsd: writ ...

  7. OpenStack 存储服务 Cinder存储节点部署NFS(十七)

    Cinder存储节点部署 1.安装软件包 yum install -y nfs-utils rpcbind 提示:早期版本安装portmap nfs-utils :包括基本的NFS命令与监控程序 rp ...

  8. 基于Nfs和Samba的Lamp环境实现

    一 系统环境二 网络文件系统与web环境的结合三 搭建lamp环境四 实现nfs服务五 实现samba服务六 实现效果 一 系统环境 系统平台:CentOS release 6.8 (Final) L ...

  9. Linux下的NFS快速配置教程与安全策略

    [51CTO专稿]在Linux下实现文件共享有多种方式,NFS就是其中之一.网络文件系统(NFS)协议是由Sun MicroSystem在20世纪80年代为了提供对共享文件的远程访问而设计和实现的.该 ...

随机推荐

  1. 第三方过滤器在TVideoGrabber中的使用

    在TVideoGrabber中可以使用第三方过滤器,并可插入到预览.录制或回放流中,添加到列表里. 要在一个图像中中应用一个过滤器,需要像下面的例子中一样调用 ThirdPartyFilter_Add ...

  2. android 学习随笔十八(广播与服务 )

    1.广播接收者注册 清单文件注册(Android四大组件都要在清单文件中注册) 一旦应用部署,广播接收者就生效了,直到用户手动停止应用或者应用被删除 广播接收者可以使用代码注册 需要广播接收者运行时, ...

  3. Android如何区分app原生和webview实现

    在开发Android app时,特别是强内容展现型的功能,会想在原生native实现和web实现中做选择,做这种选择的时候,难免想看看竞品或其它app类似功能是用哪种方式实现的.但是如何判断其它app ...

  4. HDU(1175),连连看,BFS

    题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1175 越学越不会,BFS还是很高级的. 连连看 Time Limit: 20000/100 ...

  5. error:no such partition grub rescue

    重新安装了ubuntu12.04后,Ubuntu开机就出现:error:no such partitiongrub rescue >一般情况下,出现这类错误是引导文件出错或者系统找不到引导文件, ...

  6. Linux下统计出现次数最多的指定字段值

    假设桌面上有一个叫“data.txt”的文本,内容如下: {id='xxx' info='xxx' kk='xxx' target='111111' dd='xxx'}{id='xxx' info=' ...

  7. div+css基础

    Div+css技术 Div是用于存放文字,图片,元素的容器 Css 是用于指定存放在div中的内容如何显示,包括内容的位置和外观(层叠样式表) Html 文件 <!--必须引入的文件--> ...

  8. bouncycastle创建csr

    public static void main(String[] args) { String subjectDN = "CN=duwenlei"; String algorith ...

  9. Myeclipse 添加server library

    来自网络资料 (1)File->New->Other (2)弹出窗口勾上Show All Wizards,然后在type fiter text那里输入Server,选中server-> ...

  10. 监控windows服务,当服务停止后自动重启服务

    近期花时间研究了一下windows和linux下某服务停了后自动重启的功能,在网上收集了些资料,并经过测试,在此整理一下.这里介绍的是windows服务的监控,是通过批处理来实现的.本例是监控wind ...