歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> linux下創建只有某個用戶組可用的文件夾

linux下創建只有某個用戶組可用的文件夾

日期:2017/3/1 15:21:40   编辑:關於Linux
linux下創建只有某個用戶組可用的文件夾 su root mkdir testdir ll drwxr-xr-x 2 root root 4096 7月 31 23:51 testdir/ chmod g+w,o-rx testdir——————————修改權限,擁有者、群組有rwx權限,其他沒有任何權限 ll drwxrwx--- 2 root root 4096 7月 31 23:51 testdir/ groupadd testgroup—————————創建群組testgroup useradd -G testgroup testuser——————添加用戶testuser到testgroup中 chgrp testgroup testdir/————————修改testgroup所屬群組 useradd user2 su user2 cd testdir————————無權限 su testuser cd testdir————————OK
Copyright © Linux教程網 All Rights Reserved