After successful installing Magento 2 we get some trouble with folder permission on some specific server configuration.
Official Magneto site recommends to set 770 for folders and 660 as file permissions but after that we may get 403 forbidden error or CSS and JS would not load properly.
In my case 775 for folders and 664 as file permissions works properly. But still it creates issues for some template folders and files which Magento generates on the fly, because Magento creates them with default Magento permissions 770 and 660. If we do below changes in code this issue can be resolved.
/vendor/magento/framework/Filesystem/DriverInterface.php
(WRITEABLE_DIRECTORY_MODE and WRITEABLE_FILE_MODE)
/lib/internal/Cm/Cache/Backend/File.php
(directory_mode and file_mode)
Although this is wrong way to do chnages in core files but this is indeed as it works great. For now this is available and fast solution for this issue, I am looking still working to find out proper solution with can fix it without touching Magento core files. Most probably that would be on serve side. Will keep you posted for this.
I'm guessing the files will be overwritten when we will update Magento so keep notes of where to do the code changes (again) after future updates.
Official Magneto site recommends to set 770 for folders and 660 as file permissions but after that we may get 403 forbidden error or CSS and JS would not load properly.
In my case 775 for folders and 664 as file permissions works properly. But still it creates issues for some template folders and files which Magento generates on the fly, because Magento creates them with default Magento permissions 770 and 660. If we do below changes in code this issue can be resolved.
/vendor/magento/framework/Filesystem/DriverInterface.php
(WRITEABLE_DIRECTORY_MODE and WRITEABLE_FILE_MODE)
/lib/internal/Cm/Cache/Backend/File.php
(directory_mode and file_mode)
Although this is wrong way to do chnages in core files but this is indeed as it works great. For now this is available and fast solution for this issue, I am looking still working to find out proper solution with can fix it without touching Magento core files. Most probably that would be on serve side. Will keep you posted for this.
I'm guessing the files will be overwritten when we will update Magento so keep notes of where to do the code changes (again) after future updates.
Magento 2 One step checkout is the best.
ReplyDeleteBarcode Management for Magento, Affiliate for Magento, PDF Invoice for Magento, One Step Checkout for Magento
Deletehttps://blog.magestore.com/magento-download/
ReplyDeletehttps://blog.magestore.com/aheadworks-partnership/