From 15e0697411d1b44e00fd5503c4d516a07e171416 Mon Sep 17 00:00:00 2001 From: svxf Date: Sun, 14 Oct 2018 22:14:48 +0400 Subject: [PATCH] another myfacl fix --- .zprezto/abra/functions.zsh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.zprezto/abra/functions.zsh b/.zprezto/abra/functions.zsh index c32876f..5a0d700 100644 --- a/.zprezto/abra/functions.zsh +++ b/.zprezto/abra/functions.zsh @@ -6,9 +6,18 @@ function myfacl { 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}" + chown -R "${1}:${1}" "${@:2}" + chmod -R u=rwX,g=rX,o= "${@:2}" + + setfacl -Rb "${@:2}" + setfacl -Rm "\ +user:${1}:rwX,\ +default:user:${1}:rwX,\ +group:${1}:rX,\ +default:group:${1}:rX,\ +other::0,\ +default:other::0\ +" "${@:2}" } function is_local { @@ -173,6 +182,8 @@ function rsync2 { --stats \ --verbose \ --links \ + --no-perms \ + --chmod=ugo=rwX \ "${(@)@}" }