mkdir(): Permission denied 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()-&gt;config-&gt;get('defaultFolderPermissions');
749         }
750 
751         $path = static::normalizePathSeparators($path);
752 
753         if (!static::folderExists($path, false, $suppressErrors))
754         {
755             $oldumask = $suppressErrors ? @umask(0) : umask(0);
756 
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             }
762 
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         }
768 
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:
https://craftcms.com/docs/2.x/folder-structure.html
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.