Flush fails on OSX

I’m building a new site using SS 4.1.1 on a Mac running High Sierra. I’m using the inbuilt web server with PHP upgraded to 7.1.
Trying to run ?flush on my new site generates an error message:

[Warning] chmod(): Operation not permitted

GET /?flush=&flushtoken=81e9113a9dd8c090fac1baefd9e3cfa2

Line 357 in /Users/macbookbruce/websites/jennisite/vendor/league/flysystem/src/Adapter/Local.php


  • chmod(/Users/macbookbruce/websites/jennisite/public/assets/.htaccess, 436)
  • League\Flysystem\Adapter\Local->setVisibility(.htaccess, public)

Any suggestions? I have set permissions on the whole web site folder to Read/Write for everyone.

You wouldn’t want to set write permissions on the whole site.

What does pressing command i show for that .htaccess file? I don’t have errors on OSX, my settings on that file are
Me: Read & Write.
Wheel: Read & Write.
Everyone: Read only.

Its only my local development server so I’m happy with write permissions for everyone while I sort things out. The .htaccess file permissions are:
Me: Read & write
Fetching…: Read only
everyone: Read & write

The webserver needs to be able to read, write and change the permissions on that file, so it really needs to own it.

If you change ownership of the .htaccess file to the webserver, hopefully the error will go away.

If it’s a new site, and assuming the webserver can write files in the assets directory, then you can quite often just delete the current file and run a dev/build?flush to force the file to be recreated.

all sorted, for now.
I deleted /public/assets/.htaccess before running ?flush.
The file was recreated and ?flush now works.

I’m experimenting with modules so the site has been deleted and reinstalled a few times today.

Thanks for the prompt help, guys.

I had this problem, you need to change the owner of the .htacess using terminal:

sudo chown _www {** PATH TO HTACESS FILE**}