yii framework PHP User Error - The directory is not writable by the Web process
According to your question, the command you have typed is:
#chmod -R 777 /var/www/html/backend/web/assets
Since you want to change the permission of that folder, you need to have a elevated user privileges. Hence append sudo before your query to provide the elevated user privileges to the command and to change the directory permissions
Related videos on Youtube
Ramesh Chand
My Name Is Ramesh Chand I am a Windows/Linux System Admin. I have been working as the Windows/Linux System Admin since December 2006. In that time I have implemented the Active Directory Infrastructure, ADFS, SharePoint, Exchange and worked on Windows,Linux, Ubuntu,Debian,Centos,RedHat, MAC, AWS Platform, Windows Azure, SQL Server, E-jabbered, IIS and Apache Web Servers Node.js and Nginx Web Server Environment along with other tasks and responsibilities.
Updated on September 18, 2022Comments
-
Ramesh Chand over 1 year
I am facing an issue with YII Framework on Server Red Hat Enterprise Linux Server release 7.2 (Maipo)
PHP Version:
# php -v
Output:
PHP 7.0.5 (cli) (built: Apr 2 2016 13:08:13) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
Permission:
#chmod -R 777 /var/www/html/backend/web/assets
Error:
PHP User Error – yii\base\ErrorException Exception (Invalid Configuration) 'yii\base\InvalidConfigException' with message 'The directory is not writable by the Web process: /var/www/html/backend/web/assets' in /var/www/html/vendor/yiisoft/yii2/web/AssetManager.php:213
Solutions Already tried: https://stackoverflow.com/questions/34482597/yii2-the-directory-is-not-writable-by-the-web-process-frontend-web-assets
$ps -ef | grep apache | grep -v grep
Output:
apache 14041 14040 0 06:56 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND apache 14042 14040 0 06:56 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND apache 14043 14040 0 06:56 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND apache 14044 14040 0 06:56 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND apache 14045 14040 0 06:56 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND apache 14046 14040 0 06:56 ? 00:00:00 /usr/sbin/httpd -DFOREGROUND
The same thing working fine with Centos, Ubuntu and other OSes but on Red Hat problem is still there.
-
Burgi almost 8 yearsDoes the error still occur if you suspend the
httpd
service before runningchmod
? -
Ramesh Chand almost 8 yearsYes Burgi the error still occurring.
-