
有一個檔案有read only
權限,但是root
連不上chmod
。
文件的權限:-rw-r--r--
嘗試後chmod 777
:
chmod: changing permissions of ‘motd’: Operation not permitted
我是從帳戶上做的root
。怎麼可能鎖定這樣的檔案?
答案1
驗證文件的所有權
ls -l
更改文件的所有權
chown root motd
有一個檔案有read only
權限,但是root
連不上chmod
。
文件的權限:-rw-r--r--
嘗試後chmod 777
:
chmod: changing permissions of ‘motd’: Operation not permitted
我是從帳戶上做的root
。怎麼可能鎖定這樣的檔案?
驗證文件的所有權
ls -l
更改文件的所有權
chown root motd