Okay, so as I explained earlier in this thread, I upgraded to php 7.0.7 using the L//P package, which sits beside the old (Apple OS) version but overrides it in a couple of places to make the new version work. So I have both versions in this folder...
/usr/local/php5
/usr/local/php5-7.0.7-20160526-160257 (i.e. 7.0.7)
Each has its own www.conf.default file at...
/user/local/{php version}/etc/php-fpm.d/www.conf.default
Oh... I've just realize that if I open the php5 version of the www.conf.default file, then that file opens (as expected). But if I open the php7 version (e.g. mate php5-7.0.7-20160526-160257
), it actually opens the php5 version. So that must be part of the L//P package design, to reuse same file in Apple's install, I'm guessing. In any case, any change I make to either www.conf.default file location (whether change contents or rename file), it only makes the change on the php5 version, so that's where I'll keep focusing.
I've edited the www.conf.default to for this:
user = www-data
group = www-data
...
listen.owner = www-data
listen.group = www-data
After restarting the server, the "Whoops" error on the /less directory changes back to the error originally reported at top of this thread:
( ! ) Warning: file_put_contents(/Users/me/Sites/discussion/assets/rev-manifest.json): failed to open stream: Permission denied in /Users/me/Sites/discussion/vendor/flarum/core/src/Asset/RevisionCompiler.php on line 179
If I change the file name to www.conf (i.e. drop the ".default"), the same error results. So I'm guessing either the file name doesn't matter (illogical) or the file isn't being used/read at all. I've left the name changed as www.conf.
Running ls -l
on my .../storage/less directory give me records like this...
-rwxr-xr-x 1 _www staff 17063 Jun 12 11:46 lessphp_14kjn4fqnjb48w8w0c0wo0cc0cos40g.lesscache
I don't know why the user is "_www" instead of "me", but I seem to be able to change the user easy enough if I want to. In any case, I'm not sure that's relevant at the moment considering the current error status has changed again back to what it was originally, pointing to somewhere in .../vendor/flarum...
Moving on, I tried running what @webeindustry said on the /less directory just for kicks, and it gives me an illegal group name...
chgrp to www-data -R less
chgrp: to: illegal group name
If I try to use sudo chgrp to www-data -R less
, I get the same result.
That's where I'm at. Not far.
Just so you know, I'm comfortable using the command-line, but I've never played with any php files before outside of uncommenting the occasional line in an php.ini file. This www.conf and user/group designations and permissions stuff is new territory. It seems strange to me that a simple update of the php would cause so much trouble, but what do I know...