I setup a Magento 2.4.5-p1 to save media folder to S3 Bucket. Everythin worked as expected with product images. After this I install a theme that includes a Frontend-Builder. This theme reads and writes some assets from/to media folder. When I try to open the theme settings in configuration returns me the error:

Exception #0 (Magento\Framework\Exception\LocalizedException): Unable to create directory 'https://xxxxxxx-magento-files-xxxxxxx.s3.eu-central-1.amazonaws.com'. Access forbidden.

When I inspect the media folder I see that is trying to create a folder and a new created folder named https: is there. After this I checked the theme files and find the this:

public function getFileList()
        $folderPath = $this->fileSystem->getDirectoryRead(DirectoryList::MEDIA)->getAbsolutePath('/mgs/fbuilder/restore/');

        $io = $this->ioFile;
        $io->open(['path' => $this->fileSystem->getDirectoryRead(DirectoryList::MEDIA)->getAbsolutePath($folderPath)]);
        try {
            return array_reverse($io->ls());
        } catch (\Exception $e) {
        return null;

I think that the problem is that trying to get media folder path which in this case is the S3 bucket url instead of var/www/... which is the absolute path that must use. Μaybe i'm completely wrong but any help would be appreciated.

1 Answer 1


I am using the same magento version but the issue i am getting is that the updated css not syncing with amazon s3 bucket. This is when I update the theme color from backend. The css file is changed but its not syncing to s3 bucket even when remote-storage sync command is run. Do you know why the css file is not syncing?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.