目錄沒有w許可權
$ rm test1
rm: remove write-protected regular empty file 『test1』? y
rm: cannot remove 『test1』: permission denied
r:具有目錄結構列表的許可權
w:建立新的檔案與目錄、刪除已存在的檔案、將已存在的檔案或目錄進行更名、移動該目錄內的檔案、目錄位置
x:代表使用者是否能進入該目錄或成為工作目錄的用途。如果你在某目錄下不具有x許可權,那麼你就無法切換到該目錄下,也就無法執行任何
有r、沒有x許可權
$ ll test/
ls: cannot access test/test1: permission denied
total 0
-????????? ? ? ? ? ? test1
$ ls -ld test/
drwxr-xrw-. 2 test test 19 feb 5 17:43 test/
$ ls -l test/
total 4
-rw-------. 1 root root 19 feb 5 17:43 test1
$ cat test/test1
cat: test/test1: permission denied
$ rm -rf test1
$ ll
total 8
-rwxr-xr-x. 1 test test 17 feb 5 17:54 test
-rwxrwxrwx. 1 test test 16 feb 8 20:36 test1
$ ls -ld /tmp/test/
drwxr-xr-x. 2 test test 31 feb 5 17:54 /tmp/test/
$ pwd
/tmp/test
$ rm -rf test1
rm: cannot remove 『test1』: permission denied
目錄與檔案的許可權意義
許可權對檔案的重要性 3.x excute 該檔案具有可以被系統執行的許可權 在linux下面,我們的檔案是否能被執行是由是否具有 x 這個許可權來決定,而跟檔名是沒有絕對的關係 許可權對目錄的重要性 檔案是存放實際資料的所在,目錄主要的內容是記錄檔名列表,檔名與目錄有強烈的關聯。因此許可權對於檔案...
目錄與檔案之許可權意義
目錄與檔案之許可權意義 現在我們知道了linux系統內檔案的三種身份 擁有者 群組與其他人 知道每種身份都有三種許可權 rwx 已知道能夠使用chown,chgrp,chmod去修改這些許可權與屬性,當然,利用ls l去觀察檔案也沒問題。前兩小節也談到了這些檔案許可權對於資料安全的重要性。那麼,這些...
linux 目錄與檔案的許可權意義
我們知道,linux系統內檔案有三種身份 所有者 使用者組與其他人 每種身份都有三種許可權 r w x 下面來介紹許可權對目錄和檔案的意義 1.許可權對檔案的意義 檔案時實際含有資料的地方,包括一般文字檔案 資料庫內容檔案 二進位制可執行檔案等 2 w write 可以編輯 新增或者是修改該檔案的內...