For the installation to work properly, all files written by Composer *must* be owned by the web server user. There are at least two ways to do this:
We suggest running Composer in a web server shell in a development environment only. In a more secure environment, you should change ownership to the web server user after you run Composer.
In the discussion that follows, it's assumed that the CentOS web server user is apache and the Ubuntu web server user is www-data.
To switch to the web server user on Ubuntu:
su www-data
www-data user's shell and to set a password, enter the following command:
sudo chsh -s /bin/bash www-data && sudo passwd www-data
su www-data
To switch to the web server user on CentOS:
su - apacheIf you don't know the user's password or if the following error displays, continue with the next step; otherwise, continue with Running Composer to update dependencies.
This account is currently not available.
apache a valid shell account so you can switch to it, enter the following command:
sudo chsh -s /bin/bash apache && sudo passwd apache
su - apache