5 檔案許可權設定

2021-07-02 23:03:44 字數 347 閱讀 8853

注:test1 使用者預設屬於test1 使用者組

建立test檔案 內含test1.txt 和 test2.txt

chgrp test1 test1.txt  修改test1.txt 使用者組屬於test1

chgrp -r test1 test 遞迴修改test檔案(包含內部檔案)使用者組屬於test1

chown  -r test1 test  遞迴修改test檔案(包含內部檔案)使用者屬於test1

chown test1 test1.txt 修改test1.txt使用者屬於test1

chmod  *** test 修改檔案許可權

如bye!

by linson!

5 檔案許可權操作

1 include 2 int stat const char path,struct stat buf 函式功能 獲得指定pat 件的所有資訊儲存於buf結構中 返回值 操作成功返回0,失敗返回 1 stat結構體 struct stat 與stat類似功能的函式fstat include int...

5 檔案許可權 檔案壓縮打包

命令 解釋ls lh 顯示許可權 chmod ugo rwx dir1 新增所有者 群組 其他人在dir1的讀 寫 執行許可權 chmod go rex dir1 刪除群組 其他人對dir1讀 寫 執行許可權 chown user1 file1 更改file1的所有者為user1 chown r u...

linux筆記六 檔案許可權設定

1.檔案 目錄 許可權本身劃分 讀read 寫write 執行 execute 許可權從使用者的角度劃分 主人許可權user 同組使用者許可權group 其他組使用者的許可權other music.txt 歌詞 yixun 主人 music 組 讀 寫 執行 dehua music 讀 xiaoga...