Author: Shivam Mathur (shivammathur) Date: 2025-02-14T08:08:06+05:30 Commit: https://github.com/php/web-downloads/commit/c52cd699ede7c2c86ae6f32d5cd5875f7c26de3f Raw diff: https://github.com/php/web-downloads/commit/c52cd699ede7c2c86ae6f32d5cd5875f7c26de3f.diff
Fix directory permissions Changed paths: M src/Actions/GetArtifacts.php M src/Http/Controllers/PeclController.php M src/Http/Controllers/PhpController.php Diff: diff --git a/src/Actions/GetArtifacts.php b/src/Actions/GetArtifacts.php index 3eb92cb..2b7ef7f 100644 --- a/src/Actions/GetArtifacts.php +++ b/src/Actions/GetArtifacts.php @@ -37,7 +37,7 @@ public function handle($workflow_run_id, $token): void if (is_dir($workflowRunDirectory)) { (new Helpers)->rmdirr($workflowRunDirectory); } - mkdir($workflowRunDirectory, 0755, true); + mkdir($workflowRunDirectory, 0777, true); foreach ($artifacts['artifacts'] as $artifact) { $filepath = $workflowRunDirectory . "/" . $artifact['name'] . ".zip"; (new FetchArtifact)->handle($artifact['archive_download_url'], $filepath, $token); diff --git a/src/Http/Controllers/PeclController.php b/src/Http/Controllers/PeclController.php index 73fe86e..02ba4c3 100644 --- a/src/Http/Controllers/PeclController.php +++ b/src/Http/Controllers/PeclController.php @@ -49,7 +49,7 @@ protected function fetchExtension(string $extension, string $ref, string $url, s $filepath = $directory . "/$extension-$ref-" . hash('sha256', $url) . strtotime('now') . ".zip"; if(!is_dir($directory)) { - mkdir($directory, 0755, true); + mkdir($directory, 0777, true); } (new FetchArtifact)->handle($url, $filepath, $token); diff --git a/src/Http/Controllers/PhpController.php b/src/Http/Controllers/PhpController.php index 2d0479b..e803534 100644 --- a/src/Http/Controllers/PhpController.php +++ b/src/Http/Controllers/PhpController.php @@ -51,7 +51,7 @@ private function fetchPhpBuild(string $url, string $token): void $filepath = $directory . "/php-" . $hash . ".zip"; if(!is_dir($directory)) { - mkdir($directory, 0755, true); + mkdir($directory, 0777, true); } (new FetchArtifact)->handle($url, $filepath, $token);