快捷搜索:   服务器  安全  linux 安全  MYSQL  dedecms

linux 文件、目录写保护

文件:
[root@book ~]# touch a.txt
[root@book ~]# chattr +i a.txt [root@root ~]# rm -f a.txt rm: cannot remove `a.txt': Operation not permitted [root@book ~]# ls anaconda-ks.cfg a.txt Desktop  install.log install.log.syslog [root@book ~]# chattr -i a.txt [root@book ~]# rm -f a.txt [root@book ~]# ls anaconda-ks.cfg Desktop  install.log install.log.syslog

目录:
[root@root root]# mkdir test [root@root root]# chattr +i test [root@root root]# rm -fr test
rm: cannot remove directory `test': Operation not permitted
顶(0)
踩(0)

您可能还会对下面的文章感兴趣:

最新评论