Yii2 - Directory not writable in web process | interface / web / assets

I searched for this problem on the Internet, but none of them helped me. Also this one does not:

chgrp apache /path/to/mydir
chmod g+w /path/to/mydir

My server is centos 7. Can you help me?

+9
source share
5 answers

Try the following commands:

  • This will give you the apache username. In most cases, the user will be www data.
    ps -ef | grep apache | grep -v grep

  • Run this command after going to the / frontend / web: folder and
    sudo chgrp www-data ./assets

    sudo chmod g+w ./assets/

Your problem will be resolved.

+24
source

( CentOS7). , . , selinux, .

setenforce 0

, /etc/selinux/config:

SELINUX=disabled
+7

I have the same problem on an ubuto instance that I liked and solve the problem

sudo chmod 777 /home/nicjccom/public_html/asset

and also did it

sudo chgrp root /home/nicjccom/public_html/asset
+2
source

Try the following command

I grant permissions for the html folder in the www.My html folder containing several projects.

chgrp -R user html/
chmod -R g+w html/
chmod -R g+w html/
0
source

You can try this:

chcon -R -t httpd_sys_content_rw_t 'YOUR_PATH_HERE'
0
source

Source: https://habr.com/ru/post/1621884/


All Articles