0

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.

  • Does the error still occur if you suspend the httpd service before running chmod? – Burgi May 5 '16 at 13:32
  • Yes Burgi the error still occurring. – Ramesh Chand May 5 '16 at 15:07
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.