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年代为了提供对共享文件的远程访问而设计和实现的.该 ...
随机推荐
- 三层架构与MVC的区别
我们平时总是将混为一谈,殊不知它俩并不是一个概念.下面我来为大家揭晓我所知道的一些真相. 首先,它俩根本不是一个概念. 三层架构是一个分层式的软件体系架构设计,它可适用于任何一个项目. MVC是一个设 ...
- C语言初学者代码中的常见错误与瑕疵(15)
见:http://www.cpfn.org/bbs/viewtopic.php?f=85&t=5946&sid=0252f08a6d697fbf5a684ec5f6faf1f2 相关链 ...
- JSON转换类
MXS&Vincene ─╄OvЁ &0000010 ─╄OvЁ MXS&Vincene MXS&Vincene ─╄OvЁ:今天很残酷,明天更残酷,后天很美好 ...
- python核心编程学习记录之数字
仅用于整数的操作
- 由 "select *" 引发的“惨案”
今天凌晨做发布, 要合并多个分数据库的表数据到主数据库中, 有 30+ 分数据库. 前面都比较顺利, 在临近结束时,突然发现一个字段的值插入错误. 有一个表 T,字段分别为 (f1, f2, f3, ...
- 【python cookbook】【字符串与文本】14.字符串连接及合并
问题:将许多小字符串合并成一个大的字符串 解决方案: 1.针对少数量的字符串:+ 2.针对大量的字符串对象的连接,更高效的方法:join() 3.更加复杂的字符串:format() >>& ...
- Android的init过程(二):初始化语言(init.rc)解析【转】
转自:http://www.cnblogs.com/nokiaguy/p/3164799.html Android的init过程(一) 本文使用的软件版本 Android:4.2.2 Linux内核: ...
- oracle 自动关闭 数据库连接
数据库启动后过一会自动断开连接(大概10分钟) 方法一.直接修改资源配置文件 分三个步骤在sqlplus环境下完成. 第一步,查询资源文件,找到CONNECT_TIME所在的pr ...
- ACM题目————Subsequence
Description A sequence of N positive integers (10 < N < 100 000), each of them less than or eq ...
- ajax 无刷新分页
//ajax 无刷新分页1.前台要做的 滑动时 当前page+1,通过page ajax请求后台接口获取数据将数据进行拼装;2.后台要做的 做分页接口返回json数据前台判断触发请求条件: var p ...