Skip to content

Commit 29a03a8

Browse files
authored
Merge pull request #201 from Niolak/fix/v4-permissions-snapshot-files
Fix/v4 permissions snapshot files
2 parents c5317d1 + 083451f commit 29a03a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Filesystem.php

+4
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ public function put(string $filename, string $contents): void
6363
{
6464
if (! file_exists($this->basePath)) {
6565
mkdir($this->basePath, 0777, true);
66+
chmod($this->basePath, 0777);
6667
}
6768

6869
file_put_contents($this->path($filename), $contents);
70+
chmod($this->path($filename), 0666);
6971
}
7072

7173
public function delete(string $fileName): bool
@@ -77,9 +79,11 @@ public function copy(string $filePath, string $fileName): void
7779
{
7880
if (! file_exists($this->basePath)) {
7981
mkdir($this->basePath, 0777, true);
82+
chmod($this->basePath, 0777);
8083
}
8184

8285
copy($filePath, $this->path($fileName));
86+
chmod($this->path($fileName), 0666);
8387
}
8488

8589
public function fileEquals(string $filePath, string $fileName): bool

0 commit comments

Comments
 (0)