今天想在实验室分配的服务器上添加一个普通用户, 所以用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使用详解

最新文章

  1. html5,单击显示详细信息
  2. Perst常用命令
  3. [MCSM]伪随机数和伪随机数生成器
  4. 通过Ajax post Json类型的数据到Controller
  5. 入门训练 A+B问题
  6. 20160808_Linux服务
  7. java基于xml配置的通用excel单表数据导入组件(一、实际应用过程)
  8. ASP.net 中关于Session的存储信息及其它方式存储信息的讨论与总结
  9. 安装Oracle11后在SQL Developer启动时提示:enter the full pathname for the java.exe
  10. Flex4开发笔记(与JAVA交互)
  11. Canvas入门(3):图像处理和渲染文本
  12. 【Android Developers Training】 78. 序言:执行网络操作
  13. [2013-07-22]varnish-cache 安装配置及体验笔记
  14. 老婆大人 split,slice,splice,replace的用法
  15. HTML5制作网页(2)
  16. java提高(3)---正则表达式(2)
  17. BZOJ2142礼物——扩展卢卡斯
  18. python之字符串常用的方法
  19. javascript的异步编程
  20. 排错-Loadrunner添加Windows Resource计数器提示“找不到网络路径”解决方法

热门文章

  1. NativeViewer for VS2010
  2. iOS wkWebView点击链接无反应
  3. 搭建Windows Node.js环境
  4. archive的时候报“ no identity found"错误 解决方式
  5. linux系统启动过程具体解释-开机加电后发生了什么 --linux内核剖析(零)
  6. react import改为绝对路径
  7. JAVA学习第六十三课 — 关于client服务端 && URL类 & URLConnection
  8. SteinerTree模板
  9. Kotlin——中级篇(五):枚举类(Enum)、接口类(Interface)详解
  10. 边双联通问题求解(构造边双连通图)POJ3352(Road Construction)