--- /usr/sbin/webapp-config 2005-08-03 17:09:15.000000000 +0200 +++ webapp-config 2005-08-17 15:10:38.000000000 +0200 @@ -2032,8 +2032,15 @@ # inherit the original permissions off the original # file + + # Check for GNU or BSD stat + if stat 2>&1 | grep coreutils; then + STAT="stat -c '%a'" + else + STAT="stat -f '%Lp'" + fi - my_perms="`stat -c '%a' \"$MY_APPDIR/$1/$2\"`" + my_perms="`${STAT} \"$MY_APPDIR/$1/$2\"`" chmod "$my_perms" "$3/$my_file" # make sure these files are never world-writable