• Resolved lurch999

    (@lurch999)


    I’ve got WP 4.3.1 running on Centos 6, all files in /var/www/html owned by apache, folder (755) and file (644) permissions are correct for everything within.

    When I try to update to 4.4 via the Dashboard, I’m prompted for FTP credentials to perform updates.

    Odd that the plugins are able to update — usually this problem is caused by files not owned by apache in my experience — but Word Press itself cannot update itself.

    Ideas, suggestions?

    Dan

Viewing 15 replies - 1 through 15 (of 27 total)
  • Moderator James Huff

    (@macmanx)

    What version of PHP is your server running, and is it running as an Apache module or fastCGI?

    Thread Starter lurch999

    (@lurch999)

    Hi James,

    PHP 5.6.16
    Apache 2.2.15

    Apache module.

    The following PHP snippet shows that PHP runs as apache (in case this helps):

    <?php
    
    if(function_exists('posix_geteuid')){
        // use posix to get current uid and gid
        $uid   = posix_geteuid();
        $usr   = posix_getpwuid($uid);
        $user  = $usr['name'];
        $gid   = posix_getegid();
        $grp   = posix_getgrgid($gid);
        $group = $grp['name'];
    }else{
        // try to create a file and read it's ids
        $tmp = tempnam ('/tmp', 'check');
        $uid = fileowner($tmp);
        $gid = filegroup($tmp);
    
        // try to run ls on it
        $out = <code>ls -l $tmp</code>;
        $lst = explode(' ',$out);
        $user  = $lst[2];
        $group = $lst[3];
        unlink($tmp);
    }
    
    echo "Your PHP process seems to run with the UID $uid ($user) and the GID $gid ($group)\n"; ?>
    Moderator James Huff

    (@macmanx)

    Is there anything in your server error logs when you try to do an update?

    Thread Starter lurch999

    (@lurch999)

    No, nothing in the Apache logs. Is there a way to make WP more verbose in terms of logging?

    Moderator James Huff

    (@macmanx)

    Thread Starter lurch999

    (@lurch999)

    Hi James, so I installed the Debug Bar and then saw this error when trying to get the update:

    WARNING: wp-admin/includes/file.php:939 – fopen(/var/www/html/temp-write-test-1449710183): failed to open stream: Permission denied
    do_core_upgrade, request_filesystem_credentials, get_filesystem_method, fopen

    Ideas? Thanks for your help so far, much appreciated!

    Moderator James Huff

    (@macmanx)

    Permission denied, fun! (ok, not really)

    Are you running any server-side or by-proxy security that you have control of, mod_security, Cloudflare, Sucuri, firewalls, etc?

    Thread Starter lurch999

    (@lurch999)

    I do have SUHOSIN installed as well as mod_security and another Apache security module. I’ll see about disabling those at least temporarily. Still odd that plugins are okay but not a WP update, no?

    Moderator James Huff

    (@macmanx)

    Oh, it is very odd. We have another issue we’re tracking where WP can update, but not plugins/themes.

    I think it’s safe to say they’re both breaking our brains a bit. ??

    Thread Starter lurch999

    (@lurch999)

    No joy, I uninstalled Suhosin, mod_security and mod_evasive, restarted Apache, and had the same problem. A bonafide mystery. I guess I’ll have to brave the manual install…

    Moderator James Huff

    (@macmanx)

    With those disabled, was it still failed to open stream: Permission denied ?

    Thread Starter lurch999

    (@lurch999)

    Yup, the same error after all of these were uninstalled.

    Moderator James Huff

    (@macmanx)

    Did you have any security plugins installed in WordPress?

    Thread Starter lurch999

    (@lurch999)

    Actually it was a tad more verbose:

    WARNING: wp-admin/includes/file.php:939 – fopen(/var/www/html/temp-write-test-1449711934): failed to open stream: Permission denied
    require_once(‘wp-admin/admin.php’), do_action(‘dashboard_page_background-updates-debugger’), call_user_func_array, Background_Update_Tester_Plugin->content_wrapper, Background_Update_Tester_Plugin->content, Background_Update_Tester_Plugin->tests, call_user_func, Background_Update_Tester_Plugin->test_all_files_writable, Automatic_Upgrader_Skin->request_filesystem_credentials, WP_Upgrader_Skin->request_filesystem_credentials, request_filesystem_credentials, get_filesystem_method, fopen

    Thread Starter lurch999

    (@lurch999)

    I do, I have Word Fence. I’ll try disabling that temporarily and see.

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Plugins update fine but WP 4.4 does not’ is closed to new replies.