MAGENTO 2 Centos 7 Server
To fix message "Your web server is set up incorrectly and allows unauthorized access to sensitive files. Please contact your hosting provider".
1) ### shh- Run the following command from your root account. ###
chown -R accountuser:accountusergroup /path-to-root-folderl/
2) ### ssh - Run the following command from the domain account user(not your web server account such as apache etc). ###
find . -type d -exec chmod 770 {} \; & find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento
chmod -R g+w /path-to-root-folderl/{pub,var} chmod -R g+w /path-to-root-folderl/{app/etc,vendor} chmod -R g+s pub/static pub/media . find var/generation -type d -exec chmod g+s {} \; find var/session -type d -exec chmod g+s {} \;
3) ### ssh - Run the following command from your root account. ###
chown -R domain_account_user:webservergroup /path-to-root-folderl/var chown -R domain_account_user:webservergroup /path-to-root-folder/app/etc chown -R domain_account_user:webservergroup /path-to-root-folderl/pub chown -R webserverUSER:webservergroup /path-to-root-folder/var/session
This will fix this error and many other error. Note: disable SUPHP when using magento 2, you will save yourself a lot of headache. Currently I'm running mod_mpm_event with ea-apache24-mod_cgid and PHP 7 and ea-php70-php-fpm.
I had my magento 2 running with just mod_mpm_event with ea-apache24-mod_cgid and PHP 7 before I added PHP-FPM.
If you are running cpanel/ apache and you don't want to use easyapache to move to mod_mpm_event + ea-apache24-mod_cgid you can use shell from ssh . Run the command bellow from ssh . yum shell remove ea-apache24-mod_mpm_worker remove ea-apache24-mod_cgi install ea-apache24-mod_mpm_event install ea-apache24-mod_cgid run quit
Magento\AdminNotification\Model\System\Message\Security
class. which situation you got this message? – Bojjaiah Feb 12 '16 at 5:35