0

If I put all files and folders permission as 777

sudo chmod -R 777 ./

Magento2 would be worked without any issue?

I know that it's not good to have 777 on all files and folders. But I want to know Magento2 will work without any issue.

Thank you.

1 Answer 1

1

It is not advisable to put 777 for folder permissions.It is alright if you are developing in your local but never on production as it can lead to security issues as 777 means that you wish to allow all processes the ability to read write and execute files.You can use the following command for a one user system from terminal 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

For reference please follow: https://devdocs.magento.com/guides/v2.4/install-gde/prereq/file-system-perms.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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