ACL使用

# wrote by dywer  03/11/09
vim /etc/fstab  defaults,acl
mount -o remount,acl [mount point]
# for files
getfacl file
setfacl --modify u:user:rwx file # add user permission
setfacl --modify g:group:rwx file # add group permission
setfacl --remove u:user:rw file  # delete
setfacl --remove-all file  # delete all
setfacl --modify u::rwx file  # same as chmod
setfacl --modify g::rw file
setfacl --modify o::rw file
# for directories
setfacl -dm u:oracle:rwx dir 
drwxr-sr-x+ 3 root root 4096 03-11 11:32 dir
  
# all subdir and file auto has oracle permission when be created

你可能感兴趣的:(职场,acl,休闲)