linux创建root也不能访问的文件夹

就像在windows下创建两个点以上的文件无法删除一样,linux下也可以有同样的技巧:

[root@localhost ~]# touch test/.immutable
[root@localhost ~]# chattr +i test/.immutable
[root@localhost ~]# chattr +i test/
[root@localhost ~]# mkdir test/foobar
mkdir: cannot create directory `test/foobar': Permission denied
[root@localhost ~]# touch test/barfoo
touch: cannot touch `test/barfoo': Permission denied
原文地址:https://www.cnblogs.com/trying/p/3488210.html