0

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.

3
  • This isn't about file permissions but rather file ownership. E.g. if I have a file with permissions 777 owned by root and in the root group, then the apache user won't be able to change its permissions – Tom J Nowell Nov 3 '20 at 19:24
  • @TomJNowell, but the question is what file do I need to change permissions? or change ownership ? – user2924482 Nov 3 '20 at 19:58
  • 1
    I don't think it's possible to tell from just the information you've given, what were you trying to do when it happened? A WP update? – Tom J Nowell Nov 3 '20 at 23:56
0

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

2
  • You mean you had files there with wrong permissions? Why would WordPress be trying to chmod those? – Rup Dec 17 '20 at 8:22
  • @Rup bb-plugin tried to access these files using WP files API. I don't remember if the plugin tried to create new files or change existing ones. – Aleksandr Levashov Dec 18 '20 at 14:43

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.