From e6673fe76e2f8ab0f141e611ea897a8d2405aaac Mon Sep 17 00:00:00 2001 From: svxf Date: Fri, 9 Nov 2018 16:03:45 +0400 Subject: [PATCH] facl twiddling --- .zprezto/abra/functions.zsh | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.zprezto/abra/functions.zsh b/.zprezto/abra/functions.zsh index e58225a..e74ade6 100644 --- a/.zprezto/abra/functions.zsh +++ b/.zprezto/abra/functions.zsh @@ -1,21 +1,12 @@ function reset_facl { FUNCTION_PRELUDE - : "${1:?user?}" - : "${2:?dirs?}" + : "${1:?dirs?}" - chown -R "${1}:${1}" "${@:2}" - chmod -R u=rwX,g=rwX,o= "${@:2}" + setfacl -Rb "${@:1}" - setfacl -Rb "${@:2}" - setfacl -Rm "\ -user:${1}:rwX,\ -default:user:${1}:rwX,\ -group:${1}:rwX,\ -default:group:${1}:rwX,\ -other::0,\ -default:other::0\ -" "${@:2}" + chown -R "root:root" "${@:1}" + chmod -R "u=rwX,g=rwX,o=" "${@:1}" } function add_facl {