1

I’m getting this error when accessing/writing images. It’s only just come along suddenly after one or a couple of updates.

League\Flysystem\Exception

Impossible to create the root directory "/Users/username/Sites/project-name/craft/web/images/folder". mkdir(): Permission denied

  • Running Nitro with Multipass 1.5
  • Multipassd has all Full Disk Access (but had to add this manually from Application Services)
  • Craft CMS 3.5.16
  • MacOS Catalina 10.15.7
  • Composer version 2.0.8
  • Unable to change file permissions in Finder/Transmit etc
  • Not new installs
  • Unable to load an image through CP. Same message as above

Nitro running other simpler site fine, so no problems there.

At a loss, any site running locally that needs images will fail to load, but /admin runs all fine.

Thanks :)

2
  • Does nitro apply && nitro restart do any for you? – RitterKnight Dec 7 '20 at 22:13
  • Unfortunately not. – Simon Clayson Dec 8 '20 at 6:51
2

This could be because you are setting your Settings → Assets → your volume File System Path to an absolute location outside the VM.

Create an alias (or hard-set webroot) using:

'aliases' => [
    'webroot' => dirname(__DIR__) . '/web'
],

In your config/general.php (changing web if you have a different public root).

With this in place, change the File System Path of your volume to @webroot/your/path which should solve you issue.

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.