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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM