From f57e5e81462028bdf565bea95d3e0f00851a10e6 Mon Sep 17 00:00:00 2001 From: George Clark Date: Tue, 8 Dec 2015 21:33:12 -0500 Subject: [PATCH] Item13866: FreeBSD uses different options Also, cgisess files need to be 600 --- core/tools/fix_file_permissions.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/tools/fix_file_permissions.sh b/core/tools/fix_file_permissions.sh index 19aad1d412..12b3cb9d30 100755 --- a/core/tools/fix_file_permissions.sh +++ b/core/tools/fix_file_permissions.sh @@ -1,9 +1,13 @@ -#!/bin/sh # These permissions are set to be permissive enough for Foswiki to run on a wide variety of platforms +#!/bin/sh + +# These permissions are set to be permissive enough for Foswiki to run on a wide variety of platforms # Note that the bin/configure file directory checkers will report files that are more or less # permissive than these settings. These permissions will work on most systems. On multi-purpose # servers, the "world" permissions should be removed, and the corresponding changes made to # the configuration variables listed below. +OPT=-c # -c: Show changes. On FreeBSD, needs to be -vv + ROOT=444 # Server root read only DIR=755 # Directories need "exec" for directory operations. Matches {Store}{dirPermission} TOPICS=644 # Topics: Update by foswiki CGI, read by web server Matches {Store}{filePermission} @@ -59,7 +63,8 @@ find templates -type f -exec chmod -c $READONLY {} \; echo echo "Working is server writable ($WORKING) - with exceptions ($READONLY)" find working -type f ! -name README ! -name "cgisess_*" -exec chmod -c $WORKING {} \; -find working/configure -type f -exec chmod -c $READONLY {} \; +find working/configure -type f ! -name "cgisess_*" -exec chmod -c $READONLY {} \; +find working/configure -name "cgisess_*" -exec chmod -c $SECURITY {} \; find working -name README -exec chmod -c $READONLY {} \; echo