深圳雲計算培訓 檔案屬性 chattr

2021-09-25 23:46:18 字數 1133 閱讀 6075

檔案許可權管理之: 檔案屬性

注:設定檔案屬性(許可權),針對所有使用者,包括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

深圳雲計算培訓 怎麼樣學習雲計算相關技術?

雲計算是很適合小白學習的一門課程,不需要你的英語能力有多好,你也可以直接不懂雲計算是什麼,但是你要具備乙個好的學習態度,那就夠了。學習雲計算得從基礎開始,首先要熟悉linux作業系統的基礎配置,對linix系統會簡單的操作,掌握網路的配置,路由器 交換機的劃分。其次要對資料庫有一點的了解,sql語句...

深圳雲計算學習 NFS

重要指數4星 專案名稱 為集群中的 web server 配置後端儲存 nas 192.168.122.59 web1 192.168.122.85 web2 192.168.122.166 web3 192.168.122.111 nas web1 web2 web3 centos6 centos...

Linux雲計算基礎 檔案管理

1.檔案型別 理解 常見 root localhost ll d bin ls home rwxr xr x.1 root root 117608 8月 20 2019 bin ls drwxr xr x.3 root root 17 2月 26 15 07 home root localhost ...