From e72e6c220a7dc579c98654c4c1ce4df751355a54 Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Fri, 10 May 2024 16:38:16 +0300 Subject: [PATCH] Update Backup.php --- web/app/Models/Backup.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/Models/Backup.php b/web/app/Models/Backup.php index 05727e3..64bf845 100644 --- a/web/app/Models/Backup.php +++ b/web/app/Models/Backup.php @@ -287,8 +287,8 @@ class Backup extends Model file_put_contents($backupTempScript, $shellFileContent); - // chmod read only by root - shell_exec('chmod 400 '.$backupTempScript); + // chmod read and delete by owner only + chmod($backupTempScript, 0600); $processId = shell_exec('bash '.$backupTempScript.' >> ' . $backupLogFilePath . ' & echo $!'); $processId = intval($processId);