[Mon Dec 10 09: 48: 14.553353 2018] [: error] [pid 19077] [client] PHP Fatal error: Uncaught exception 'RuntimeException' with message (/ var / www / vhosts / workshop. app / app / cache / prod) \ n 'in /var/www/vhosts/workshop.app/app/bootstrap.php.cache:2671\nStack trace: \ n # 0 /var/www/vhosts/workshop.app /app/bootstrap.php.cache(2632): Symfony \ Component \ HttpKernel \ Kernel-> buildContainer () \ n # 1 /var/ww/vhosts/workshop.app/app/bootstrap.php.cache (2411): Symfony \ Component \ HttpKernel \ Kernel-> initializeContainer () \ n # 2 /var/www/vhosts/workshop.app/app/bootstrap.php.cache(2442): Symfony \ Component \ HttpKernel \ Kernel-> boot () \ n # 3 /var/www/vhosts/workshop/app.php(28): Symfony \ Component \ HttpKernel \ Kernel-> handle (Object (Symfony \ Component \ HttpFoundation \ Request)) \ n # 4 {main} \ n thrown in /var/www/vhosts/workshop.app/app/bootstrap.php.cache on line 2671

Apache running under apache permissions: apache

php5.6

The rights to the folder were set and 777 the owner is naturally apache, but at the same time completely refuses to write everything into this folder. where to look, where to dig is not clear

UPD1 HTTPD config

<VirtualHost *:80> ServerName "domain.ru:80" ServerAlias "www.domain.ru" DocumentRoot "/var/www/vhosts/workshop.app/web" <Directory /var/www/vhosts/workshop.app/web> AllowOverride All Require all granted # Options FollowSymlinks </Directory> 
  • Just in case, I will clarify, did you put the rights on the /var/www/vhosts/workshop.app/app/cache/ folder? - Denis Startsev
  • to the whole folder /var/www/vhosts/workshop.app and below lying. put and on the mind of the files 644 on the folder 755, the main owner of Apache: Apache, did not start, 777 I think in any case should start, but did not start. - Bansh
  • Try to add in web / app.php and web / app_dev.php, uncomment at the beginning of the umask file (0000); - Denis Startsev
  • the same mistake. nothing has changed. - Bansh
  • And how does php module start up or in fcgi mode? If as a module, then I don’t know what the problem is, if fcgi then php has its user - Denis Startsev

1 answer 1

So I figured it out myself. It turns out SELinux blocked the entry in the folder.

 chcon -Rv --type=httpd_sys_rw_content_t /var/www/ 

And that's all. Thanks to everyone who helped to understand.