Quantcast
Channel: CodeSection,代码区,Linux操作系统:Ubuntu_Centos_Debian - CodeSec
Viewing all articles
Browse latest Browse all 11063

Linux chattr命令参数及使用方法详解

$
0
0

背景:发现用ansible去做sudo时,发现权限不够:

TASK [irdcops : 修改 /etc/sudoers] *********************************************** skipping: [10.70.37.24] fatal: [10.70.36.172]: FAILED! => {"changed": false, "failed": true, "msg": "Could not replace file: /tmp/tmpfToWiS to /etc/sudoers: [Errno 1] Operation not permitted"} fatal: [10.70.36.173]: FAILED! => {"changed": false, "failed": true, "msg": "Could not replace file: /tmp/tmpvA5FJh to /etc/sudoers: [Errno 1] Operation not permitted"} [root@v-szq-Localizationweb13 etc]# chmod 755 sudoers

chmod: changing permissions of `sudoers': Operation not permitted

[root@v-szq-Localizationweb13 etc]# lsattr sudoers

----i--------e- sudoers

[root@v-szq-Localizationweb13 etc]#chattr -i sudoers [root@v-szq-Localizationweb13 etc]# visudo

http://www.linuxeye.com/command/chattr.html


Viewing all articles
Browse latest Browse all 11063

Trending Articles