0

I am installing a plugin but when I say I get a permission error, how can I fix it?

I attached a screenshot of what I did to install it

Magento

  • You are invoking magento with the user named daemon. Magento wants to remove a cache directory, but this user does not have permissions to do so. Try to find the permissions and owner with ls -al /var/www/html/var/. If you do not know how to read the output, post it here in the question. Then, either run magento as the owner of the directory, or change the owner of the cache directories. – where Aug 13 at 23:47
2

try below command to give permission.

sudo chmod -R 777 var/*

sudo chmod -R 777 pub/*

sudo chmod -R 777 generated/*

Then run your command

1

You can try giving permission to var folder

sudo chmod -R 777 var/ pub/ generated/

Also, you can set ownership and permissions to Magento root folder

cd magento2
find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} +
find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} +
chmod u+x bin/magento

To optionally enter all commands on one line, enter the following assuming Magento is installed in /var/www/html/magento2:

cd /var/www/html/magento2 && find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.