溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

云計算學習路線課程大綱資料:文件屬性 chattr

發(fā)布時間:2020-08-11 14:49:10 來源:ITPUB博客 閱讀:149 作者:千鋒云計算 欄目:云計算

給大家分享一些云計算學習路線課程大綱資料,這篇文章是關(guān)于文件屬性 chattr的一些資料,希望能給大家一些幫助:

云計算學習路線課程大綱資料:文件屬性 chattr

文件權(quán)限管理之: 文件屬性

注:設(shè)置文件屬性(權(quán)限),針對所有用戶,包括root

[root@tianyun ~]# touch file100 file200

[root@tianyun ~]# lsattr file100 file200

-------------e- file100

-------------e- file200

[root@tianyun ~]# man chattr att屬性

[root@tianyun ~]# chattr +a file100

[root@tianyun ~]# chattr +i file200

[root@tianyun ~]# lsattr file100 file200

-----a-------e- file100 a屬只能夠追加 不可以寫

----i--------e- file200

[root@tianyun ~]# echo 111 > file100 //以覆蓋的方式寫入 

bash: file100: Operation not permitted

[root@tianyun ~]# rm -rf file100

rm: cannot remove `file100': Operation not permitted

[root@tianyun ~]# echo 111 >> file100 //以追加的方式寫入,例如日志文件 適用于日志

[root@tianyun ~]# echo 111 > file200 i 屬性 不可以改變文件 適用于 /etc/suders /passwd 文件只能看

bash: file200: Permission denied

[root@instructor ~]# echo 111 >> file200

bash: file200: Permission denied

[root@tianyun ~]# rm -rf file200

rm: cannot remove `file200': Operation not permitted

[root@tianyun ~]# chattr -a file100

[root@tianyun ~]# chattr -i file200


向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI