I seem to have had a permissions error in var and specifically var/cache.
Both were previously set to 755, which has not caused issues before. This morning my CSV files stopped being generated by cron to the var/export_bkp directory, I resolved this by setting permissions to 777.
I'm now having the problem that my site has dropped the stylesheets. I tried changing permissions of media/js & media/css to 777, and I can see it is caching stylesheets in there correctly, however, they are not being displayed on the front end.
I have tried flushing cache via Magento admin but still, have nothing. Any help would be appreciated, Thank you.
-
Check ownership for pub/static and media folderKumar M– Kumar M2018年08月16日 14:12:25 +00:00Commented Aug 16, 2018 at 14:12
-
i think you shouldn't change to 777, keep 755 and check ownership for pub/static and check file js, css existNguyễn Hồng Quân– Nguyễn Hồng Quân2018年08月17日 02:10:27 +00:00Commented Aug 17, 2018 at 2:10
1 Answer 1
If you are facing problem of css and js page load design after installation in magento2 please follow the following step-: open the terminal and navigate to magento web root
$ cd /var/www/html/magento2
Step 1.
$ php bin/magento setup:static-content:deploy
Step 2.
$ php bin/magento indexer:reindex
Step 3.
make sure apache "rewrite_module" is enable and then restart the server
Step 4.
$ chown -R www-data:www-data /var/www/html/magento2
Step 5.
$ chmod -R 777 /var/www/html/magento2
Step 6.
delete cache folder under var/cache
The above step working. I hope this will work for you also.
-
check .htaccess file inside the pub folder...Jeeva Chezhiyan– Jeeva Chezhiyan2018年08月16日 15:10:00 +00:00Commented Aug 16, 2018 at 15:10
-
Every time one uses
chmod -R 777kittens die.Chris Anderson– Chris Anderson2018年08月16日 20:20:29 +00:00Commented Aug 16, 2018 at 20:20 -
Then magento devs kill more kittens then there are stars in milky way..Vivek Kumar– Vivek Kumar2018年08月16日 22:42:28 +00:00Commented Aug 16, 2018 at 22:42
-
Lol, just saw it, @NACHIMUTHU RAMALINGAM you should not just 'chmod -R 777' the whole magento instance man, only needed folders like pub/static, generated, var etc .Vivek Kumar– Vivek Kumar2018年08月16日 22:44:53 +00:00Commented Aug 16, 2018 at 22:44