测试acl
来源:互联网 发布:金蝶软件明细账查找 编辑:程序博客网 时间:2024/05/21 00:17
环境:存储ip为172.19.61.178,linux客户端ip为172.19.61.105
存储端
在/share/nas中建立文件 123.txt, echo "test" >123.txt
查看属性getfacl 123.txt
root:/share/nas# getfacl 123.txt
# file: 123.txt
# owner: root
# group: root
user::rw-
group::r--
other::r-- //其他用户只能读
linux客户端
mount -t nfs 172.19.61.178:/share/nas /mnt
[root@chen mnt]# ls
123.txt
在linux中,建立一个用户user0,以user0来登录,则user0是不写数据到文件123.txt中
[user0@chen mnt]$ echo "user0" >>123.txt
bash: 123.txt: 权限不够
[user0@chen mnt]$ cat 123.txt
test
在存储端设置文件属性
root:/share/nas# setfacl -m other:rwx 123.txt
root:/share/nas# getfacl 123.txt
# file: 123.txt
# owner: root
# group: root
user::rw-
group::r--
other::rwx
在linux客户端,[user0@chen mnt]$ echo "user0" >>123.txt,
这样权限设置范围太广了,对user0单独设置权限
在存储端 建立用户user0(和linux客户端user0的id号相同)
设置对user0用户的权限
setfacl -m user:user0:rwx 123.txt
- 测试acl
- Hdfs的ACL测试
- 测试ASM ACL 权限控制。
- ACL
- ACL
- ACL
- ACL
- ACL
- ACL
- ACL
- ACL
- ACL
- ACL
- ACL
- acl
- ACL
- acl
- acl
- RTX2012概述-1
- zygote system_server的启动
- php和js的json转换
- 致黑马全体老师的一封感谢信
- Android 要注意的内存占用问题
- 测试acl
- (swing读书笔记)ProgressMonitor
- 英语-新视野大学英语四课后翻译(全)
- OllyDbg小知识【1】修改代码后保存
- 配置ntp服务
- 關於UltraEdit的智能提示,設置
- 主语从句、宾语从句、表语从句、同位语从句
- [Android] 如何查看当前分支
- 性能优化篇