Techies Adsense

Monday, 22 August 2016

Failed to create directory permission denied (Linux-Ubuntu-Centos-Fedora-Debian)

I was facing "php mkdir permission denied" issue on Ubuntu and Linux (Ubuntu-Centos-Fedora-Debian) during my project setup with Yii Framework

Exception – yii\base\Exception

Failed to create directory "/var/www/html/backend/runtime/logs": mkdir(): Permission denied



Solutions: 

Following are the permission example I have given to the directories.
  • $ sudo mkdir /var/www/html/backend/runtime/logs
  • $ sudo chmod -R 777 /var/www/html/backend/runtime/logs
  • $ sudo mkdir /var/www/html/backend/runtime/cache
  • $ sudo chmod -R 777 /var/www/html/backend/runtime/cache
Now "Failed to create directory permission denied" Issue has been resolved for me! 

No comments: