歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> 關於Unix >> freebsd acl

freebsd acl

日期:2017/2/28 11:11:40   编辑:關於Unix


一,掛載
編輯/etc/fstab 在需要掛載的分區後加在 acls
如:

/dev/ad0s1d /var ufs rw,acls 2 2

注:linux下 設定acl為在/etc/fstab 中加入acl即可

二,acl的設定

getfacl:取得某個檔案/目錄的acl設定規范

setfacl:設定某個目錄/文檔的acl規范


三.使用: setfacl [-mxdb] 設定值

-m:設定一個acl規范
-x:取消一個acl規范
-b:全部的acl規范都移除
-d:設定預設的acl規范,僅能針對目錄使用

1.針對使用者
例: 對test這個使用都來規范其權限為rx 則:
setfacl -m u:test:rx somefilename

2.針對群組來設定
例:將users這個群組來規范其權限為rw,則
setfacl -m g:users:rw somefilename

3.針對預設權限來規范,類似umask功能

例:setfacl -m m:rwx somefilename
Copyright © Linux教程網 All Rights Reserved