myfacl function

This commit is contained in:
2018-10-14 19:47:52 +04:00
parent ad07aec051
commit 49c160bf4f

View File

@@ -1,3 +1,16 @@
function myfacl {
FUNCTION_PRELUDE
if [[ ( -z $1 ) || ( -z $2 ) ]]; then
echo ':('
return 1
fi
setfacl -Rb "${@:2}"
setfacl -Rm "u:$1:rwX,g:$1:rwX,o::0" "${@:2}"
setfacl -Rdm "u:$1:rwX,g:$1:rwX,o::0" "${@:2}"
}
function is_local {
local HOSTNAME="$(hostname)"