PHP Warning: chmod(): Operation not permitted in class-wp-filesystem-direct.php on line 173

I running an instance of Wordpress on my web server but I'm getting this error in the logs

PHP Warning:  chmod(): Operation not permitted in 
/home/webserver/html/wp-admin/includes/class-wp-filesystem-direct.php on line 173, 
referer: http:// mysite.com/

I check the class-wp-filesystem-direct.php file on 173

here is the line:

if ( ! $recursive || ! $this-is_dir( $file ) ) {
                        return chmod( $file, $mode );
}

This are the permissions of this file:

-rwxrwxr-x 1 root apache 17K Oct 20 20:24 /home/webserver/html/wp-admin/includes/class-wp-filesystem-direct.php

Any of you knows what is wrong with my instance of Wordpress?

I'll really appreciated your help.

Topic apache php linux Wordpress

Category Web


In my case, these were files in /wp-content/uploads/bb-plugin/cache/ folder.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.