I have an old craft 2 installation. When I want to go to the frontend I get:

mkdir(): Permission denied

745     {
746         if ($permissions == null)
747         {
748             $permissions = craft()->config->get('defaultFolderPermissions');
749         }
751         $path = static::normalizePathSeparators($path);
753         if (!static::folderExists($path, false, $suppressErrors))
754         {
755             $oldumask = $suppressErrors ? @umask(0) : umask(0);
757             if ($suppressErrors ? !@mkdir($path, $permissions, true) : !mkdir($path, $permissions, true))
758             {
759                 Craft::log('Tried to create a folder at '.$path.', but could not.', LogLevel::Error);
760                 return false;
761             }
763             // Because setting permission with mkdir is a crapshoot.
764             $suppressErrors ? @chmod($path, $permissions) : chmod($path, $permissions);
765             $suppressErrors ? @umask($oldumask) : umask($oldumask);
766             return new Folder($path);
767         }
769         Craft::log('Tried to create a folder at '.$path.', but the folder already exists.', LogLevel::Warning);

Where can I read out the folder which has no permission? I've set recursive chmod 777 on all files in the project (yes I know). But this doesn't change anything.

It is on a local MAMP Pro install. Nothing is showing in any logs.

But the Control Panel is working fine.

I also tried to change the user in mamp. As suggested on discord. But that does nothing.



It's been a while since I was in Craft 2, but I'd suggest checking out this page in the docs:


Do all of the directories mentioned on that page exist on your site? Specifically, I'd confirm that you have the craft/storage folder created in your installation. If it's not there, make it and try to load the page again.


Found the error. It was the asset transformations.

If I change 'generateTransformsBeforePageLoad' => true, to false the site is being displayed (without images).

Changing asset permissions doesn't change anything. But at least I can now view the site again.

  • 1
    One of your asset sources is probably misbehaving? Might be worth a trip to the asset settings and see what's up. Upload a file to one of them and see what error you get. – RitterKnight Nov 21 '20 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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