0

I corrected the file permissions using this command (find . -type d -exec chmod 770 {} ; && find . -type f -exec chmod 660 {} ; && chmod u+x bin/magento), and after that pub folder is showing when I visit my website. Please see the screenshot for a better understanding. enter image description here

asked Nov 11, 2022 at 11:33

4 Answers 4

0

I've checked your site, looks like remove some folders and files from the Magento codebase by accident. To revert those changes, run the following commands from your Magento root directory:

rm -rf vendor
composer install
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f

Please take a look at the document from Magento official to set files and folders permissions: https://experienceleague.adobe.com/docs/commerce-operations/configuration-guide/deployment/file-system-permissions.html

answered Nov 11, 2022 at 13:33
1
  • If this answer works as your expected, please mark it as accepted. That indicates your issue is solved and makes it easier for others with the same issue to find a verified answer. Commented Nov 11, 2022 at 13:34
0

I checked the attached png file. But it looks like the index.php file was missed. So I think you have to download Magento again. If there's a composer.json in your root directory, then run the composer install command. If not, then install the magento following this doc. https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/composer.html

answered Nov 11, 2022 at 15:07
0

You can try this:

rm -rf vendor
composer install
composer update
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
answered Nov 11, 2022 at 16:17
0

You need to check the file permissions and reset it with login sudo root user to change the permissions.

run the following commands from your Magento root directory:

rm -rf generated/*
rm -rf var/*
cd pub/static
rm -r adminhtml
rm -r frontend
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush

It could fix the permission issue. If not to fix application issues such as: composer, you can then re-install magento with composer such as:

rm -rf vendor
composer install

Thanks

answered Nov 25, 2022 at 15:11

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.