Skip to content

Commit

Permalink
Item13866: FreeBSD uses different options
Browse files Browse the repository at this point in the history
Also, cgisess files need to be 600
  • Loading branch information
gac410 committed Dec 9, 2015
1 parent 22951fe commit f57e5e8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions 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}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f57e5e8

Please sign in to comment.