V
V
Viktor Yanyshev2017-11-09 17:48:50
linux
Viktor Yanyshev, 2017-11-09 17:48:50

What could be wrong with the rights?

The problem comes when I enable cnc in Yii2, to be brief:

groups $USER
ya : ya root adm cdrom sudo dip www-data backup plugdev crontab lpadmin ssh sambashare mysql docker

groups www-data
www-data : www-data ya

cd /var/www/project && \
composer create-project yiisoft/yii2-app-basic basic 2.0.13 && \
chown -R ya:www-data

In urlManager Yii:
// web.php
'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'rules' => [
               'about' => 'site/about'
            ],
        ],

I go to the address:
localhost/about
I get an error:
filemtime(): stat failed for /var/www/html/basic/runtime/cache/96/963454f612a8b5fb4a63ba1e97f028a1.bin

And, and most importantly:
sudo chmod -R 777 /var/www/project
How so?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-11-09
@slo_nik

Good evening.
For the runtime directory, set permissions to 777, for all nested directories, the owner is www-data.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question