Linux中的权限管理

touch 11.txt(创建了一个文件)

chown zhangsan:zhangsan 11.txt

ll(可看到11.txt的属主和属组都改为了zhangsan)

useradd lisi(添加普通用户李四)

su lisi(切换用户至李四)

su root(切换用户至超级管理员)

chmod o+w 11.txt(给其它用户加写的权限)

chmod g+w 11.txt(给组用户加写的权限)

chmod u+w 11.txt(给主用户加写的权限)

chmod o-w 11.txt(给其它用户去掉写的权限)

原文地址:https://www.cnblogs.com/Mandylover/p/5072442.html