Hi, I am running Virtualmin with 3 VPS installations of Wordpress. I’m on the LEMP stack, and want to use Nginx cache, but I am having permission issues.
I am using the Nginx Cache plugin by Till Kruss and I am getting the error " Filesystem API could not be initialized.". This error is telling me that Wordpress doesn’t have permission to read/write to the cache folder. I created a cache folder for each VPS, and placed it in /home/domain/public_html/cache/ and chowned it to www-data:domain, however it doesn’t seem to work. It seems it’s because the current php user cant read and write to the nginx cache folder as its owned by a different user.
Any assistance is greatly appreciated!
All of my sites are owned by the virtual server user and group. No www-data ownership.
In any case, what are the attributes for the cache folder? Maybe you just need to set write permission.
If the group matches domain-owner (
:domain) it should work, but you need to make sure that the “group” has also permission to read/write that cache folder.
Try starting by setting cache folder permission to 770, like:
chmod -R 770 /home/domain/public_html/cache
@noisemarine @Ilia It’s interesting. I originally set the folder ownership to domain:domain and the permissions to 770, and it seems to work temporarily, however when I restart the server it reverts to www-data:doamin and 755. This seems to be the problem, however I don’t know the cause.
So, figure out what’s changing ownership and fix it. It’s not Virtualmin. And, I can’t imagine it’s nginx. So, must be the plugin trying to be clever?
Thanks! I’ll contact the plugin developer about that.