bugfix - do chmod last

remotes/origin/feature_files_export
Matt Coddington 13 years ago
parent 23eba4c5e1
commit 37c02dad45
  1. 11
      conf/type/__file/gencode-remote

@ -34,11 +34,6 @@ case "$state_should" in
fi
fi
# Mode settings
if [ -f "$__object/parameter/mode" ]; then
echo chmod \"$(cat "$__object/parameter/mode")\" \"$destination\"
fi
# Group
if [ -f "$__object/parameter/group" ]; then
echo chgrp \"$(cat "$__object/parameter/group")\" \"$destination\"
@ -48,6 +43,12 @@ case "$state_should" in
if [ -f "$__object/parameter/owner" ]; then
echo chown \"$(cat "$__object/parameter/owner")\" \"$destination\"
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)

Loading…
Cancel
Save