与
ESC
输入关键词搜索文章

Linux修改文件和删除等Root权限都被禁止

全文约 174 字预计阅读 1 分钟
删除修改文件都会提示 Operation not permitted 首先先查看一下属性 lsattr file ----i-------- file 然后去除i这个属性 chattr -i file 就可以删除修改了 i表示不得任意更动文件或目录 我们可以通过man chattr查看(仅摘录相关部分): DESCRIPTION: "chattr" changes the file attributes on a Linux second extended file system. A file with the 'a' attribute set can only be open in append mode for writing. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute. A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be  written to the file. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
Linux修改文件和删除等Root权限都被禁止
分享

发表评论

评论 0 条

暂无评论,来说点什么吧。