Browse Source

Check the root directory is writable before copying .htaccess in Worker\Cron

- Addresses https://github.com/friendica/friendica/issues/7298#issuecomment-531454632
pull/7627/head
Hypolite Petovan 3 years ago
parent
commit
6576f15164
  1. 2
      src/Worker/Cron.php

2
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');
}

Loading…
Cancel
Save