bugfix - do chmod last

This commit is contained in:
Matt Coddington 2012-02-02 11:09:20 -05:00
parent 23eba4c5e1
commit 37c02dad45

View file

@ -34,11 +34,6 @@ case "$state_should" in
fi fi
fi fi
# Mode settings
if [ -f "$__object/parameter/mode" ]; then
echo chmod \"$(cat "$__object/parameter/mode")\" \"$destination\"
fi
# Group # Group
if [ -f "$__object/parameter/group" ]; then if [ -f "$__object/parameter/group" ]; then
echo chgrp \"$(cat "$__object/parameter/group")\" \"$destination\" echo chgrp \"$(cat "$__object/parameter/group")\" \"$destination\"
@ -48,6 +43,12 @@ case "$state_should" in
if [ -f "$__object/parameter/owner" ]; then if [ -f "$__object/parameter/owner" ]; then
echo chown \"$(cat "$__object/parameter/owner")\" \"$destination\" echo chown \"$(cat "$__object/parameter/owner")\" \"$destination\"
fi fi
# Mode - needs to happen last as a chown/chgrp can alter mode by
# clearing S_ISUID and S_ISGID bits (see chown(2))
if [ -f "$__object/parameter/mode" ]; then
echo chmod \"$(cat "$__object/parameter/mode")\" \"$destination\"
fi
;; ;;
absent) absent)