centosファイルシステムアクセス制御リスト


FACL:filesystem access control listファイルの拡張プロパティを使用して、追加のアクセス制御権限を保存
getfacl setfacl設定の表示
  :setfacl [-bkRd]  [-m|-x acl   ]       

     :

-m:     acl  ,   -x    

-x:      acl  ,   -m    

-b:     acl  

-k:     acl  

-R:    acl  

-d:    acl  ,      

setfacl -m m:rw inittab
    -m  ,            
        u:uid:perm
        g:gid:perm
          :
        #mkdir /backup
        #cd /backup
        #cp /etc/inittab ./
        #getfacl inittab
        #setfacl -m u:redhat:rw inittab
    owner>facl,user> group > facl group>

             mask   
    setfacl -m m:rwx [filename or directory_name]
    -x  
        setfacl -x u:uid file_name
                 :
        d:u:uid:perm file_name

        mount -o acl /dev/myvg1/mylv1 /mnt 
        dumpe2fs -h /dev/myvg1/mylv1(      ACL)
        tune2fs -o 

例:ユーザーの読み取り権限setfacl-m u:lisa:r fileを許可する
   Revoking  write  access  from  all  groups and all named users (using the
   effective rights mask)
                (       mask)
          setfacl -m m::rx file

   Removing a named group entry from a file’s ACL
         ACL  
          setfacl -x g:staff file

   Copying the ACL of one file to another
          ACL      
          getfacl file1 | setfacl --set-file=- file2

   Copying the access ACL into the Default ACL
           ACL       ACL
          getfacl --access dir | setfacl -d -M- dir