beginner
beginner

Reputation: 2032

mkdir(): Permission denied in Yii2

After installing yii2, I got the following error.

enter image description here

Some suggests that I should give full permissions to IIS_IUSRS but still to no avail.

enter image description here

Upvotes: 1

Views: 7667

Answers (1)

vijay nathji
vijay nathji

Reputation: 1638

You shouldn't need to set the permissions to 777, that is a security problem as it gives read and write access to the world. It may be that your apache user does not have read/write permissions on the directory.

If you use Ubuntu do this :

Make sure all files are owned by the Apache group and user. In Ubuntu it is the www-data group and user

chown -R www-data:www-data /path/to/webserver/www

Next enabled all members of the www-data group to read and write files

chmod -R g+rw /path/to/webserver/www

The php mkdir() function should now work without returning errors

Upvotes: 7

Related Questions