1.chgrp修改檔案所屬組
#簡單使用,將文字test.txt所屬組改為gourp1
chgrp gourp1 test.txt
2.chown修改檔案擁有者
#將test.txt檔案所屬使用者修改為user1
chown user1 test.txt
#同時修改test.txt的所屬使用者和所屬組
chown user1:group1 test.txt
3.chmod修改檔案屬性
chmod 755 test
chmod u+x test
chmod u-x test
chmod g+x test
4.usrmod修改使用者所屬組
一般的話只是將當前使用者新增到其它組中去
usrmod -a -g group1 user1
如果要徹底更改使用者所屬的組的話使用
usrmod -g group1 user1
linux修改檔案許可權和使用者組管理小結
chmod g r path file 加讀許可權 當前目錄 chmod r g r path file 加讀許可權 當前目錄以及子目錄 g r 減讀許可權 g w 加寫許可權 g wg x 加執行許可權 g x1.chgrp修改檔案所屬組 簡單使用,將文字test.txt所屬組改為gourp1 c...
linux修改檔案許可權和使用者組管理小結
chmod g r path file 加讀許可權 當前目錄 chmod r g r path file 加讀許可權 當前目錄以及子目錄 g r 減讀許可權 g w 加寫許可權 g wg x 加執行許可權 g x1.chgrp修改檔案所屬組 簡單使用,將文字test.txt所屬組改為gourp1 c...
linux檔案許可權 使用者組
新增組 groupadd 組名檢視所有組 cat etc group建立使用者並將使用者新增到組 useradd g 組名 使用者名稱刪除使用者 userdel 使用者名稱刪除使用者及使用者的主目錄檔案 userdel r 使用者名稱檢視所有使用者資訊 cat etc passwd檔案許可權解釋 當...