IMPORTANT, please fill the questions
We assume you are using Bitnami to deploy your application.
Which version of the application are you using?:
Currently updated to Drupal 8.7.7 - Installed a few weeks ago, unsure of the installation version
Please choose how you got the application: Installer (Windows, Linux, macOS), cloud image (AWS, GCE, Azure, ...) or VM (VMDK, VBOX):
Installed directly on and via Amazon lightsail AWS
It seems there is an issue with permissions. Whenever I need to log onto the console to do some changes, I always need to use 'sudo' whereas the advice on the net never does. That has not been a problem until now.
I have updated composer just today.
Now I'm trying to use Composer to install the swiftmailer libraries.
First it came up with errors of not being able to write to the cache, so I did
sudo chown -R bitnami /opt/bitnami/php/composer/cache/
as advised on https://community.bitnami.com/t/how-to-update-composer/69251/2
Now the cache errors have gone, but there are still some more errors that seem to be permission based.
This is what happens-
bitnami@ip-172-26-9-207:~/apps/drupal/htdocs$ composer require drupal/swiftmailer:1.0.0-beta2
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)Package operations: 38 installs, 0 updates, 0 removals
Installation failed, reverting ./composer.json to its original content.
PHP Warning: proc_open(): fork failed - Cannot allocate memory in phar:///opt/bitnami/php/bin/composer.phar/vendor/symfony/console/Application.php on line 952
Warning: proc_open(): fork failed - Cannot allocate memory in phar:///opt/bitnami/php/bin/composer.phar/vendor/symfony/console/Application.php on line 952 [RuntimeException] /opt/bitnami/apps/drupal/htdocs/vendor/ircmaxell/password-compat does not exist and could not be created.
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...
I have tried running this with sudo, but composer objects.
(1) am I running composer from the correct folder?
(2) is it a permissions issue and how do I fix it properly?