facl twiddling

This commit is contained in:
2018-11-09 16:03:45 +04:00
parent ef2f15f9d8
commit e6673fe76e

View File

@@ -1,21 +1,12 @@
function reset_facl { function reset_facl {
FUNCTION_PRELUDE FUNCTION_PRELUDE
: "${1:?user?}" : "${1:?dirs?}"
: "${2:?dirs?}"
chown -R "${1}:${1}" "${@:2}" setfacl -Rb "${@:1}"
chmod -R u=rwX,g=rwX,o= "${@:2}"
setfacl -Rb "${@:2}" chown -R "root:root" "${@:1}"
setfacl -Rm "\ chmod -R "u=rwX,g=rwX,o=" "${@:1}"
user:${1}:rwX,\
default:user:${1}:rwX,\
group:${1}:rwX,\
default:group:${1}:rwX,\
other::0,\
default:other::0\
" "${@:2}"
} }
function add_facl { function add_facl {