I am using Wordops v3.14.2 and I am facing an issue while I create sites using WO and after that use composer, here is what I am using and the warning I am getting.
In htdocs directory of any website, when I issue one of the following command sudo -u www-data /usr/local/bin/composer update or sudo -u www-data /usr/local/bin/composer install
I get the following warning:
Cannot create cache directory /var/www/.cache/composer/repo/https---wpackagist.org/, or directory is not writable. Proceeding without cache. See also cache-read-only config if your filesystem is read-only.
I tried googling and read multiple stackoverflow answers, however they were not related to wordops, though most of the answers suggested this to be a permissions issue with the folder, since there's no .cache folder in /var/www so the most proposed solution could not work out for me.
Can anyone here help me with this please?
P.S. The problem that I face without this cache folder is that, when I issue a composer update command without updating composer.json file then also it installs all of the packages including wordpress, themes and plugins which it should not.