[root@zhangshibo temp]# touch test
[root@zhangshibo temp]# chmod 4755 test;
[root@zhangshibo temp]# ls -l test
-rwsr-xr-x 1 root root 0 Oct 22 09:42 test
[root@zhangshibo temp]# chmod 6755 test;ls -l test
-rwsr-sr-x 1 root root 0 Oct 22 09:42 test
[root@zhangshibo temp]# chmod 1755 test;ls -l test
-rwxr-xr-t 1 root root 0 Oct 22 09:42 test
[root@zhangshibo temp]# chmod 7666 test;ls -l test
-rwSrwSrwT 1 root root 0 Oct 22 09:42 test
[root@zhangshibo temp]# chmod u=rwxs,go=x test;ls -l test
-rws--x--x 1 root root 0 Oct 22 09:42 test
[root@zhangshibo temp]# chmod g+s,o+t test;ls -l test
-rws--s--t 1 root root 0 Oct 22 09:42 test
[root@zhangshibo temp]#
本文通过一系列的命令操作演示了在Linux环境下如何修改文件权限,并解释了几种特殊权限(SUID, SGID, Sticky bit)的效果及其对文件权限显示的影响。
694

被折叠的 条评论
为什么被折叠?



