From e46963dd7fa9f6ed973e49ebef6047e6056ed4e5 Mon Sep 17 00:00:00 2001 From: Fraenkiman Date: Fri, 2 Feb 2024 23:33:39 +0100 Subject: [PATCH] File and directory rights - Sets the file and directory permissions from the FP main directory when executing the setup - See #307 --- defaults.php | 10 +++++++--- setup/main.php | 40 ++++++++++++++++++++-------------------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/defaults.php b/defaults.php index 5ef0ce3..68d3422 100755 --- a/defaults.php +++ b/defaults.php @@ -18,10 +18,11 @@ define('DUMB_MODE_ENABLED', false); // default file permissions -// change file to 776 and dir to 776 if your webserver "complains" +// https://binary-butterfly.de/artikel/dateirechte-wie-stelle-ich-das-bei-meinem-hoster-ein/ +// change file to 666 and dir to 777 if your webserver "complains" // Note: Lowering the directory and file permissions may result in FlatPress or some additional plugins not working correctly. -define('FILE_PERMISSIONS', 0776); -define('DIR_PERMISSIONS', 0776); +define('FILE_PERMISSIONS', 0666); +define('DIR_PERMISSIONS', 0777); // first some webserver setup... @@ -34,6 +35,9 @@ define('SESSION_PATH', ''); define('ABS_PATH', dirname(__FILE__) . '/'); // here was blog root in earlier versions. This has been moved to config_load() +// Is required so that the file and directory permissions can be set when executing the setup +define('BASE_DIR', dirname(__FILE__)); + // here are default config files define('FP_DEFAULTS', 'fp-defaults/'); diff --git a/setup/main.php b/setup/main.php index e27a67d..639d900 100644 --- a/setup/main.php +++ b/setup/main.php @@ -1,37 +1,37 @@