root用户无法修改文件权限(lsattr/chattr: i 和 a 属性含义)
2024-09-04 16:22:12
今天想在实验室分配的服务器上添加一个普通用户, 所以用root身份登录服务器后执行useradd命令,却提示无法读写
/etc/shadow文件; ls -l /etc/shadow发现什么权限都没有,于是就用chmod更改我(root)对/etc/shadow文件的权限,但
让我万万没有想到的是,又提示无法更改该文件的权限,于是到网上查询之后,发现了这个帖子.问题解决了。
但,i和a属性是什么东西?
我们可以通过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.
What do 'a' attribute and 'i' attribute mean?
append only (a), immutable (i).
补充:
linux三个特殊权限setuid、setgid和stick bit使用详解
最新文章
- html5,单击显示详细信息
- Perst常用命令
- [MCSM]伪随机数和伪随机数生成器
- 通过Ajax post Json类型的数据到Controller
- 入门训练 A+B问题
- 20160808_Linux服务
- java基于xml配置的通用excel单表数据导入组件(一、实际应用过程)
- ASP.net 中关于Session的存储信息及其它方式存储信息的讨论与总结
- 安装Oracle11后在SQL Developer启动时提示:enter the full pathname for the java.exe
- Flex4开发笔记(与JAVA交互)
- Canvas入门(3):图像处理和渲染文本
- 【Android Developers Training】 78. 序言:执行网络操作
- [2013-07-22]varnish-cache 安装配置及体验笔记
- 老婆大人 split,slice,splice,replace的用法
- HTML5制作网页(2)
- java提高(3)---正则表达式(2)
- BZOJ2142礼物——扩展卢卡斯
- python之字符串常用的方法
- javascript的异步编程
- 排错-Loadrunner添加Windows Resource计数器提示“找不到网络路径”解决方法
热门文章
- NativeViewer for VS2010
- iOS wkWebView点击链接无反应
- 搭建Windows Node.js环境
- archive的时候报“ no identity found&;quot;错误 解决方式
- linux系统启动过程具体解释-开机加电后发生了什么 --linux内核剖析(零)
- react import改为绝对路径
- JAVA学习第六十三课 — 关于client服务端 &;amp;&;amp; URL类 &;amp; URLConnection
- SteinerTree模板
- Kotlin——中级篇(五):枚举类(Enum)、接口类(Interface)详解
- 边双联通问题求解(构造边双连通图)POJ3352(Road Construction)