From 6576f15164b75d18376ea350bce5fe8d863d5d52 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 14 Sep 2019 06:30:41 -0400 Subject: [PATCH] Check the root directory is writable before copying .htaccess in Worker\Cron - Addresses https://github.com/friendica/friendica/issues/7298#issuecomment-531454632 --- src/Worker/Cron.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Worker/Cron.php b/src/Worker/Cron.php index 0db70f5a8d..e43fde28ef 100644 --- a/src/Worker/Cron.php +++ b/src/Worker/Cron.php @@ -104,7 +104,7 @@ class Cron // Ensure to have a .htaccess file. // this is a precaution for systems that update automatically $basepath = $a->getBasePath(); - if (!file_exists($basepath . '/.htaccess')) { + if (!file_exists($basepath . '/.htaccess') && is_writable($basepath)) { copy($basepath . '/.htaccess-dist', $basepath . '/.htaccess'); } -- 2.39.5