- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2020
12:24 PM
04-16-2020
12:24 PM
Hello mighty community... Is this a permission issue or else? I have being struggling for 3 days..
Hi mighty community,
I have being struggling on this for 3 days and have no luck. Any thoughts from anyone?
When I switch the layout of a theme, i got the following. And I was told it is a permission issue given "Can not open"
- error: Can not open /var/www/html/Magento2/app/design/frontend/MageBig/martfury/layout01/web/css/source/_mbdesign.less file
And I have set the following permission, and I still have the same issue...
- find . -type f -exec chmod 664 {} \;
- find . -type d -exec chmod 775 {} \;
- find ./var -type d -exec chmod 777 {} \;
- find ./pub/media -type d -exec chmod 777 {} \;
- find ./pub/static -type d -exec chmod 777 {} \;
- chmod 777 ./app/etc
- chmod 644 ./app/etc/*.xml
Another weird observation I noticed:
- After I tried to switch the theme and get the error above,
- if I delete everything in my /var/www/html/Magento2 folder
- and reinstall everything after installation,
- the default theme will be the one I choose before the deletion
- e.g. if I try to switch from 1 to 5 and failed (message aboeve), after delete & reinstall everything, the default theme will be 5 this time
Thank you!
Luk
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2020
07:12 PM
04-16-2020
07:12 PM
Re: Hello mighty community... Is this a permission issue or else? I have being struggling for 3 days
Hi @luklau88
There might be some permission issue.
https://devdocs.magento.com/guides/v2.3/config-guide/prod/prod_file-sys-perms.html
Try the following command once:
find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento
You can use sudo as well.
If still face issue, then try following commands once n sequence to re generations.
chmod -R 0777 var/ pub/ generated/ rm -rf var/cache/* var/view_preprocessed/* generated/* pub/static/* php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento cache:flush
I hope it will help you!