From aecc3c27c43ab87f8c508851c39ebdd63e074ae5 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 1 Jun 2022 08:59:00 +1000 Subject: [PATCH] Fixes for setting permissions on chrome binary --- app/Http/Controllers/SelfUpdateController.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/Http/Controllers/SelfUpdateController.php b/app/Http/Controllers/SelfUpdateController.php index c220c1f0400a..55a98d42a5c6 100644 --- a/app/Http/Controllers/SelfUpdateController.php +++ b/app/Http/Controllers/SelfUpdateController.php @@ -16,6 +16,7 @@ use App\Models\Client; use App\Utils\Ninja; use App\Utils\Traits\AppSetup; use App\Utils\Traits\ClientGroupSettingsSaver; +use Beganovich\Snappdf\Snappdf; use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Storage; @@ -134,6 +135,15 @@ class SelfUpdateController extends BaseController nlog("Extracting zip"); + try{ + $s = new Snappdf; + $s->getChromiumPath(); + chmod($this->generatePlatformExecutable($s->getChromiumPath()), 0755); + } + catch(\Exception $e){ + nlog("I could not set the file permissions for chrome"); + } + // $zipFile = new \PhpZip\ZipFile(); // $zipFile->openFile($file);