diff --git a/bin/_blackbox_common.sh b/bin/_blackbox_common.sh index 3d061fcd..45a3f0f2 100755 --- a/bin/_blackbox_common.sh +++ b/bin/_blackbox_common.sh @@ -390,9 +390,12 @@ function md5sum_file() { function cp_permissions() { # Copy the perms of $1 onto $2 .. end. case $(uname -s) in - Darwin | FreeBSD ) + Darwin ) chmod $( stat -f '%p' "$1" ) "${@:2}" ;; + FreeBSD ) + chmod $( stat -f '%p' "$1" | sed -e "s/^100//" ) "${@:2}" + ;; Linux | CYGWIN* | MINGW* ) chmod --reference "$1" "${@:2}" ;;