diff --git a/mastodonapi.php b/mastodonapi.php index e16e0a9..a446629 100644 --- a/mastodonapi.php +++ b/mastodonapi.php @@ -110,7 +110,6 @@ class YellowMastodonapi { $fullPath = $this->yellow->system->get("coreServerDocument") . $targetFolder . $fileName; if ( file_exists($fullPath) ) continue; - // Korrektur Blog-Ordner Rechte if ( !is_dir(dirname($fullPath)) ) { mkdir(dirname($fullPath), 0777, true); chmod(dirname($fullPath), 0777); @@ -134,6 +133,7 @@ class YellowMastodonapi { $defaultAuthor, $defaultTag, $imageFilenames, $imageAltTexts, $statusSetting ); file_put_contents($fullPath, $markdownContent); + chmod($fullPath, 0666); $postsCreated++; } return $postsCreated; @@ -144,7 +144,6 @@ class YellowMastodonapi { $imageUrl = $media["remote_url"] ?? $media["url"] ?? $media["preview_url"] ?? null; if ( empty($imageUrl) ) return false; - // Korrektur Bilder-Ordner Rechte if ( !is_dir($dirPath) ) { mkdir($dirPath, 0777, true); chmod($dirPath, 0777); @@ -168,6 +167,7 @@ class YellowMastodonapi { if ( !$imgData ) return false; file_put_contents($fullPath, $imgData); + chmod($fullPath, 0666); return $fileName; }