Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux - Centos : Giving nginx chmod access

Alright so I cannot for the life of me get rid of this error :

Warning!

ErrorException [ Warning ]: chmod(): Operation not permitted

COREPATH/classes/finder.php @ line 511:

510:    {
511:    chmod($dir.$file, \Config::get('file.chmod.files', 0666));
512:    }

Here is my setup for permissions :

(775) : drwxrwxr-x myuser:nginx

Groups :

nginx:x:499:myuser,nginx

PHP-FPM Config

user = nginx
group = nginx

So this works for creating / editing files ect. and that all works fine.

How can I get this to work correctly?

like image 390
LukePOLO Avatar asked Mar 22 '26 03:03

LukePOLO


2 Answers

As root, try:

chown nginx:nginx /your/directory/to/fuel/ -R

Also don't forget to run inside the FuelPHP directory:

php oil r install

in order to make the necessary directories of FuelPHP writable

like image 150
thpoul Avatar answered Mar 24 '26 22:03

thpoul


It was because nginx had created a file, it has to be the owner.

like image 31
LukePOLO Avatar answered Mar 24 '26 20:03

LukePOLO



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!