Web Process Permissions on Yii / Linux

I am noob and am running the Yii AWS tutorial. So far I have managed to start and run everything, including the mysql connection. But now I am using the Gii code generation tool to help create some model classes. In doing so, I get the following error:

generating models/User.php
            Unable to write the file '/var/www/html/blog/protected/models/User.php'.
done!

The documentation also says:

Info: Because the code generator needs to save the generated code into files, it is
required that the Web process have the permission to create and modify the corresponding
 files. For simplicity, we may give the Web process the write permission to the whole
 /www/blog directory. Note that this is only needed on development machines when using Gii.

This makes sense to me, and I understand the basic logic of Linux permissions for users and groups ... but not for processes. Can someone point me to the primer on how to grant write permissions to Gii for the webroot directory (in my case: / var / www / html / blog /)?

+5
source share
4 answers

I give all priverlege users to read, write and exclude in the webapp file recursively.

$sudo chmod -R og=rwx webapp_folder

, .

+7

Gii , - . . Debian/Ubuntu www-data. , , .

+5

httpd.conf :

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User daemon
Group daemon

httpd "". :

chown -R daemon:daemon /path/to/htdocs/directory

sudo su

Gii chmod 775

+3

FYI, dir, , - , , yii..

sudo chmod -R 0777 your_project_name/
0

All Articles