NFS配置项no_root_squash和root_squash的区别
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的区别的更多相关文章
- nfs配置项在/etc/exports中的说明
rw 可读写的权限 ro 只读的权限no_root_squash 登入NFS主机,使用该共享目录时相当于该目录的拥有者,如果是root的话,那么对于这个共享的目录来说,他就具有root的权 ...
- NFS CIFS SAMBA 的联系和区别
Common Internet File System, CIFS Server Message Block, SMB Network File System, NFS 在早期网络世界当中,档案数据在 ...
- 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和 ...
- NFS网络文件系统安装配置
简介 NFS(Network File System)FS是由Sun开发并发展起来的一项用于在不同机器,不同操作系统之间通过网络共享数据.客户端用mount命令把远程的NFS文件系统挂载到本地即可,操 ...
- Ubuntu环境下NFS服务器搭建
看到鸟哥私房菜对NFS的介绍,就想试试玩一下.看起来步骤也很简单. 1.背景名词. NFS(Network File System) 作用:让所有的Unix-like 机器通过网络共享彼此的文件 局限 ...
- 配置NFS服务
1. NFS配置,需要安装哪些包?nfs-utils 和 rpcbind2. 如果不开启rpcbind服务,就启动NFS,会怎么样?如果不开启rpcbind服务,会报错:rpc.nfsd: writ ...
- OpenStack 存储服务 Cinder存储节点部署NFS(十七)
Cinder存储节点部署 1.安装软件包 yum install -y nfs-utils rpcbind 提示:早期版本安装portmap nfs-utils :包括基本的NFS命令与监控程序 rp ...
- 基于Nfs和Samba的Lamp环境实现
一 系统环境二 网络文件系统与web环境的结合三 搭建lamp环境四 实现nfs服务五 实现samba服务六 实现效果 一 系统环境 系统平台:CentOS release 6.8 (Final) L ...
- Linux下的NFS快速配置教程与安全策略
[51CTO专稿]在Linux下实现文件共享有多种方式,NFS就是其中之一.网络文件系统(NFS)协议是由Sun MicroSystem在20世纪80年代为了提供对共享文件的远程访问而设计和实现的.该 ...
随机推荐
- Ceph的客户端丢失文件夹的解决办法
原来的解决办法 更新linux内核,使用linux内核级的mount方式,一段时间后将会在客户端看不到部分长期不使用的文件夹 更正后的解决办法 参考Ceph的客户端安装设置ceph-fuse方式挂载c ...
- sql server 数据库模型 备份 恢复 总结 备份脚本
事务日志是可以基于时间点恢复的,必须在full或bulk_logged模式下 Alter database [DBName] set recover bulk_logged , then the fo ...
- 鸟哥的linux私房菜学习记录之正则表达式
正则表达式具有强大的字符串处理能力,常常用来搜索删除和替换字符串,用途很广. sed awk数据处理工具 diff,cmp,patch,pr文档对比工具
- webApi FileReader
https://developer.mozilla.org/en-US/docs/Web/API/FileReader https://github.com/node-file-api/FileRea ...
- Linux下通过crontab及expect实现自动化处理
版权声明:本文为博主原创文章,未经博主允许不得转载. 目录(?)[+] 目标 为实现每天定时从其他服务器上复制文件到本地,需要使用crontab建立定时任务,并通过scp进行Linux之间的文件复制. ...
- 在CentOS之上搭建VMware Player 7
1.下载VMware-Player-7.1.2安装包 百度网盘下载地址: 链接:http://pan.baidu.com/s/1nudfo6H 密码:oemc 直接下载地址: https://down ...
- 记录整合sprinmvc+log4j的的过程
简介 由于进一步的学习以及便于自己更好的调试程序中遇到的错误,开始了将log4j整合到web项目中,项目是基于springmvc的,所以就做了一个springmvc和web项目的整合demo,本篇博客 ...
- 每日一九度之 题目1041:Simple Sorting
时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:4883 解决:1860 题目描述: You are given an unsorted array of integer numbers. ...
- cocos2dx lua bug之module 'lsqlite3' not found
05-27 15:41:01.360: D/cocos2d-x debug info(7261): [LUA-print] -------------------------------------- ...
- css杂记
1,font-variant: 设置文本是否为小型的大写字母,值可以为normal,small-caps; 2,a:link: 未访问过的 a:visited: 访问过的 a:active: 活动的链 ...