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

 

posted @ 2013-12-23 22:12  ifeixiang  阅读(3864)  评论(0编辑  收藏  举报