1、创建用户
#adduser tommy
#passwd tommy
Changing password for user tommy.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
2、设置权限
代码如下:
# setfacl -R -m u:letian:- /home/test/
-R表示递归,-m表示修改,u:letian:-表示用户(user)letian对/home/test没有任何权限。可以根据需要添加r、w、x及其组合。 我们查看一下test目录的详细信息:
参考:
https://blog.csdn.net/sinat_34886122/article/details/88353871
https://blog.csdn.net/zzg1229059735/article/details/50846602/
https://blog.csdn.net/dingding_ting/article/details/87602169
https://www.cnblogs.com/will-wu/p/12937015.html