Answers.Body: <p>It's been a while since I was in Craft 2, but I'd suggest checking out this page in the docs:</p>
  <p><a href="https://craftcms.com/docs/2.x/folder-structure.html" rel="nofollow noreferrer">https://craftcms.com/docs/2.x/folder-structure.html</a></p>
  <p>Do all of the directories mentioned on that page exist on your site? Specifically, I'd confirm that you have the <code>craft/storage</code> folder created in your installation. If it's not there, make it and try to load the page again.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-19T14:34:23.547Z
Answers.LastActivityDate: 2020-11-19T14:34:23.547Z
Answers.UserDisplayName: John Morton
Answers.Body: <p>Found the error. It was the asset transformations.</p>
  <p>If I change <code>'generateTransformsBeforePageLoad' =&gt; true,</code> to <code>false</code>
  the site is being displayed (without images).</p>
  <p>Changing asset permissions doesn't change anything.
  But at least I can now view the site again.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-21T22:41:54.187Z
Answers.Text: 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.
Answers.UserDisplayName: RitterKnight
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-20T11:55:28.707Z
Answers.LastActivityDate: 2020-11-20T11:55:28.707Z
Answers.UserDisplayName: KSPR
Body: <p>I have an old craft 2 installation.
  When I want to go to the frontend I get:</p>
  <blockquote>
  <p>mkdir(): Permission denied</p>
  </blockquote>
  <pre><code>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);
  </code></pre>
  <p>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.</p>
  <p>It is on a local MAMP Pro install. Nothing is showing in any logs.</p>
  <p>But the Control Panel is working fine.</p>
  <p>I also tried to change the user in mamp. As suggested on discord. But that does nothing.</p>
  <p>‍♂️</p>
  
Tags: <php><craft2><mamp>
Title: mkdir(): Permission denied
ThreadText: # mkdir(): Permission denied
  
  (Asked by: username_0 on 2020-11-19)
  
  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         }
  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.
  
  ‍♂️
  
  **Tags:** php, craft2, mamp
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-11-19. Score: 3
  
  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.
  
  
  ---
  
  ### Answer by username_0 on 2020-11-20. Score: 1
  
  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.
  
  > **Comments:**
  > **username_2**: 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.  
  
  ---
  
  