WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] Fix WordPress can't update itself or plugins (4 posts)

  1. firedev
    Member
    Posted 2 years ago #

    If you're faced with this horror (usually happens when Ask Apache Protect is installed) there is a fix, which I believe should be included into the new WordPress release.

    In wp-admin / admin.php there are these lines:

    !defined('FS_CHMOD_DIR') && define('FS_CHMOD_DIR', (S_IRWUGO & ~ umask()));
    !defined('FS_CHMOD_FILE') && define('FS_CHMOD_FILE', (S_IRWXUGO & ~ umask()));

    Which are ok but S_IRWUGO = 0666 and S_IRWXUGO = 0777 so for each files WordPress sets rwxrwxrwx and rw-rw-rw- for folders which is not correct and leads to problems sometimes.

    To fix this change those lines to;

    !defined('FS_CHMOD_DIR') && define('FS_CHMOD_DIR', (S_IRWXUGO & ~ umask()));
    !defined('FS_CHMOD_FILE') && define('FS_CHMOD_FILE', (S_IRWUGO & ~ umask()));
  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Do not edit core files! You risk bring your entire site down and/or endangering the security of your WordPress installation. If you believe that you have found a bug, please log it via WordPress Trac.

  3. firedev
    Member
    Posted 2 years ago #

    Thank you, just did.

  4. Jen Mylo
    Key Master
    Posted 2 years ago #

    Since this has been reported on Trac as a bug, closing this support thread.

Topic Closed

This topic has been closed to new replies.

About this Topic