I installed magento 2.3 in localhost (Ubuntu 19.04). and changed the ownership & permissions of install directory using the command
sudo chown -R www-data:www-data /var/www/magentoProject
sudo chmod -R 775 /var/www/magentoProject
and i included user to www-data group.
I installed composer globally. And whenever i run the composer command inside my project directory am getting the error as below.
I really appreciate any help you can provide.
2
Answers
As you’ve stated in your question you have …
www-data
for your projectmidhun
to thewww-data
groupchmod 775
… but you’re wondering why those permissions aren’t granted.
Your new group membership on ubuntu isn’t applied until you log out and log back in. Therefore you’re effectively not yet a member of the
www-data
group!Another option is to use
su
to switch into a subshell with your user like this:This will apply the new group ownership right away.
try changing the ownership of
bin/magento
file to the user you are using forcomposer
Reference: https://stackoverflow.com/a/56563434/4482269