0

I have been going through the steps of configuring Craft 3 CMS locally. I used Scotchbox and Composer for the installation on Ubuntu via MacOS Mojave, and up until the point of uploading an asset to the local server, everything has been fine... Now I constantly receive the message:

Upload failed. The error message was: “Impossible to create the root directory "/Users/marcus/projects/craft-two/web/images/drinks". mkdir(): Permission denied

I have since tried to update permissions, making the project folder craft-two be readable, writable and executable for users and groups, but this hasn't helped.

Would greatly appreciate some guidance... Have searched a fair bit to no avail. Thanks

MarcusW
  • 31
  • 3

2 Answers2

3

You've configured the asset volume incorrectly. It's really easy to do.
On the file system path. Don't lead with a "/"

If you put "/images/backgrounds", then change it to "images/backgrounds"

The default placeholder in Craft for this configurable field can make this an easy mistake to make.

Nick
  • 1,080
  • 10
  • 16
0

Go to http://yourlocal.test/admin/utilities/php-info and check which is the username/group that your web server is running. After that you can set your correct user permissions with this command:

sudo chown -R username.group /Users/marcus/projects/craft-two

also be sure that /Users/marcus/projects/craft-two/web/images/drinks is read/write

sudo chmod 775 -R /Users/marcus/projects/craft-two/web/images