A
A
Arx7772015-12-25 15:54:31
linux
Arx777, 2015-12-25 15:54:31

Trouble setting up symfony 2.7 and 3.0 (same issue). Is there any other solution?

Trouble setting up symfony 2.7 and 3.0 (problem is the same)

Major problems have been detected and must be fixed before continuing: Change the permissions of either "app/cache/" or "var/cache/" directory so that the web server can write into it. Change the permissions of either "app/logs/" or "var/logs/" directory so that the web server can write into it.

Naturally, I tried standard solutions from: symfony.com/doc/current/book/installation.html
Charter Setting up Permissions : ctrl+f -> Setting up Permissions
Configured acl via setfacl
[email protected] /v/w/symfony.loc> sudo rm -rf var/cache/*
[email protected] /v/w/symfony.loc> sudo rm -rf var/logs/*
[email protected] /v/w/symfony.loc> sudo setfacl -R -m u:apache:rwX -m u:Yuri:rwX var/cache var/logs
[email protected] /v/w/symfony.loc> sudo setfacl -dR -m u:apache:rwX -m u:Yuri:rwX var/cache var/logs
[email protected] /v/w/symfony.loc> sudo service httpd restart
Redirecting to /bin/systemctl restart  httpd.service

The web server group is exactly apache. Proof
[email protected] /v/w/symfony.loc> 
ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1
apache
[email protected] /v/w/symfony.loc>

I also used the extreme solution from the Setting up Permissions chapter : substituted it at the beginning of the files: (bin/console, web/app.php and web/app_dev.php) -> umask(0000) at the beginning;
[email protected] /v/w/symfony.loc> sudo service httpd restart
Redirecting to /bin/systemctl restart  httpd.service
[email protected] /v/w/symfony.loc> service httpd status
Redirecting to /bin/systemctl status  httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Чт 2015-12-24 23:17:13 MSK; 11min ago
 Main PID: 9196 (httpd)
   Status: "Total requests: 8; Idle/Busy workers 100/0;Requests/sec: 0.0121; Bytes served/sec:  51 B/sec"
   CGroup: /system.slice/httpd.service
           ├─9196 /usr/sbin/httpd -DFOREGROUND
           ├─9197 /usr/sbin/httpd -DFOREGROUND
           ├─9198 /usr/sbin/httpd -DFOREGROUND
           ├─9199 /usr/sbin/httpd -DFOREGROUND
           ├─9201 /usr/sbin/httpd -DFOREGROUND
           ├─9205 /usr/sbin/httpd -DFOREGROUND
           ├─9207 /usr/sbin/httpd -DFOREGROUND
           └─9354 /usr/sbin/httpd -DFOREGROUND

дек 24 23:17:13 localhost.localdomain systemd[1]: Starting The Apache HTTP...
дек 24 23:17:13 localhost.localdomain httpd[9196]: AH00548: NameVirtualHos...
дек 24 23:17:13 localhost.localdomain systemd[1]: Started The Apache HTTP ...
Hint: Some lines were ellipsized, use -l to show in full.
[email protected] /v/w/symfony.loc>

Nginx and php-fpm definitely not enabled
[email protected] /v/w/symfony.loc> sudo service php-fpm status
[sudo] пароль для Yuri: 
Redirecting to /bin/systemctl status  php-fpm.service
● php-fpm.service - The PHP FastCGI Process Manager
   Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
[email protected] /v/w/symfony.loc> sudo service nginx status
Redirecting to /bin/systemctl status  nginx.service
● nginx.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
[email protected] /v/w/symfony.loc>

I didn’t find any more solutions in the vastness of Ru&En-net :( I repeat, the problem on symfony 2.7 and 3.0 is identical. I tried on fedora 22 php5.6.15 and php7. I have already tried various combinations of apache:Yuri owners, including setting new files for creating new files - nothing helped. :( Any other options?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Osher, 2015-12-25
@miraage

sudo chmod -R 777 var/logs var/cache

D
Denis, 2015-12-25
@prototype_denis

Add juzver to the server group and watch the server logs, not the Symfony output.
What's up with fedora and reload httpd
stackoverflow.com/a/16213681
Give all files an owner www-data:www-data and look at the result. If it works, then just add "yourself" to the www-data group. (www-data, as an example, yours may be different)
If it doesn't work, then study the web server logs more carefully.
Make sure that it works as the right user, hooks the right configs, and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question