Linux文件/目錄的權(quán)限及歸屬管理使用-創(chuàng)新互聯(lián)

一、文件的權(quán)限和歸屬概述

站在用戶的角度思考問題,與客戶深入溝通,找到渠縣網(wǎng)站設(shè)計與渠縣網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗,讓設(shè)計與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個性化、用戶體驗好的作品,建站類型包括:網(wǎng)站設(shè)計、成都網(wǎng)站制作、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、域名注冊、虛擬空間、企業(yè)郵箱。業(yè)務(wù)覆蓋渠縣地區(qū)。

1、訪問權(quán)限

讀取r:允許查看文件內(nèi)容、顯示目錄列表;

寫入w:允許修改文件內(nèi)容,允許在目錄中新建、移動、刪除文件或子目錄;

可執(zhí)行x:允許運(yùn)行程序、切換目錄

2、歸屬(所有權(quán))

屬主:擁有該文件或目錄的用戶賬號;

屬組:擁有該文件或目錄的組賬號;

3、查看文件的權(quán)限和歸屬

4、chmod設(shè)置文件權(quán)限

chmod命令的基本語法格式如下:


應(yīng)用舉例:

[root@centos01 ~]# touch 1.txt   <!--創(chuàng)建1.txt文件-->
[root@centos01 ~]# ll 
總用量 8
-rw-r--r-- 1 root root  0 1月 11 22:27 1.txt
-rw-------. 1 root root 1572 10月 23 22:37 anaconda-ks.cfg
-rw-r--r--. 1 root root 1603 10月 23 23:36 initial-setup-ks.cfg
[root@centos01 ~]# chmod u+x ./1.txt <!--屬主用戶添加執(zhí)行權(quán)限-->
[root@centos01 ~]# ll
總用量 8
-rwxr--r-- 1 root root  0 1月 11 22:27 1.txt
-rw-------. 1 root root 1572 10月 23 22:37 anaconda-ks.cfg
-rw-r--r--. 1 root root 1603 10月 23 23:36 initial-setup-ks.cfg
[root@centos01 ~]# chmod u-x,g+x,o+w 1.txt  
<!--屬主用戶取消執(zhí)行權(quán)限,組添加執(zhí)行權(quán)限,其他用戶添加寫入權(quán)限-->
[root@centos01 ~]# ll
總用量 8
-rw-r-xrw- 1 root root  0 1月 11 22:27 1.txt
-rw-------. 1 root root 1572 10月 23 22:37 anaconda-ks.cfg
-rw-r--r--. 1 root root 1603 10月 23 23:36 initial-setup-ks.cfg
[root@centos01 ~]# chmod 755 1.txt <!--添加755權(quán)限(rwxr-xr-x)-->
[root@centos01 ~]# ll
總用量 8
-rwxr-xr-x 1 root root  0 1月 17 02:36 1.txt
-rw-------. 1 root root 1572 10月 23 22:37 anaconda-ks.cfg
-rw-r--r--. 1 root root 1603 10月 23 23:36 initial-setup-ks.cfg

當(dāng)前名稱:Linux文件/目錄的權(quán)限及歸屬管理使用-創(chuàng)新互聯(lián)
瀏覽路徑:http://muchs.cn/article46/dpjceg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供電子商務(wù)、網(wǎng)站收錄網(wǎng)頁設(shè)計公司、虛擬主機(jī)、云服務(wù)器、關(guān)鍵詞優(yōu)化

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站建設(shè)