From: Hypolite Petovan Date: Sat, 14 Sep 2019 10:30:41 +0000 (-0400) Subject: Check the root directory is writable before copying .htaccess in Worker\Cron X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6576f15164b75d18376ea350bce5fe8d863d5d52;p=friendica.git Check the root directory is writable before copying .htaccess in Worker\Cron - Addresses https://github.com/friendica/friendica/issues/7298#issuecomment-531454632 --- 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'); }