본문 바로가기

Linux/Commands Part

setfacl

1.touch myfile
ls -l myfile


2,serfacl -m u::---,g::---,o::--- myfile
ls -l myfile

 

3,touch foo
setfacl -m u:test1:rwx,g:test2:rwx,o:--- foo
getfacl foo

 

4,mask 를 r--로 변경하면 test1,test2의 ACL은 실제 r--이 된다.
setfacl -m m:r-- foo

 

5,디렉터리는자신의 디렉터리내에서 생성되는 파일에 자동으로 적용되는 디폴트 ACL을
가질수 있다.
mkdir mydir
setfacl -m d:u:test1:rwx mydir
getfacl mydir