歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> linux修改文件權限和用戶組管理小結

linux修改文件權限和用戶組管理小結

日期:2017/3/1 15:40:43   编辑:關於Linux
linux修改文件權限和用戶組管理小結 經常會用到的命令,記一下。 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
Copyright © Linux教程網 All Rights Reserved