• Looking at two blogs I maintain, hosted at different hosts. On both, I am running WP 3.1, and the Dashboard shows that 3.1.3 is available. On both, I click on the “Please update now.” link, and they both bring me to very similar pages (differing in substance only in the Plugins they also show as having updates available. They both show 2 WP update buttons, one to “Download 3.1.3” and the other to “Update Automatically” On both, I press the “Update Automatically” button. On the “good” one, the next screen shows a bunch of update steps being taken, starting with “Downloading update from…” and ending with “WordPress updated successfully” followed by the “Go to Dashboard” link.

    On the other blog, however, what comes up after pressing the “Update Automatically” button is a page labelled “Connection Information” which is looking for FTP username/password and allowing FTP/SFTP.

    So first of all, I’d like to know what makes WP choose between those two different outcomes after pressing “Update Automatically” If I could get the “bad” host to do the “good” thing, I’d be all set.

    Failing that, I’d like the process to accept my perfectly good FTP credentials that I can use to *actually* FTP to the site. But it doesn’t. Argh! Double argh!!

    Please, there must be someone here who understands, or who can point me to a more appropriate way or location for asking.

Viewing 5 replies - 1 through 5 (of 5 total)
  • With your install that has automatic updates not asking for a username/password, the WordPress files are owned by the web server process (a typical setting for shared hosting). This allows WordPress to auto-update and overwrite files without asking you for information.

    On the other install, the WordPress files are not owned by the web server process. The only way to change this is if you have command line access; then you could use chown/chmod to change the permissions of the files to the web server user.

    Also, if you have valid FTP credentials, you should be able to have WordPress use them. However, if the web server isn’t set up with the proper PHP extensions, this may be the failure point. You’d have to check with your host.

    Thread Starter tastewar

    (@tastewar)

    Thanks, Tim. Can you point me to anything which documents the correct permissions and what directories need to be setup in what way? On the surface of it, the two sites appear to have identical permissions, but I don’t know if the owner is different between the two. When I ftp to both sites, and do a “dir” command (which lists more details, including two username columns), on both servers, both username columns show the user account I am logging on to, when listing the “wp-admin” directory. I assume one of those columns is the owner.

    There is *one* noticeable difference: on the updateable server, the listing for the parent directory (..) shows 99 in the second user column, whereas in the broken one, it shows the user account name.

    The “broken” install was installed in a subdirectory (“dev”) whereas in the working one, the install was in the more standard “public_html” directory (don’t know how common that is, both of these are hosted on sites that use cPanel shared hosting software, and in fact both are at the same hosting company, though the non-working one is through a reseller.

    And I definitely *do* have valid FTP creds — I use them all the time for command line FTP. Can you be more specific about “proper PHP extensions?”

    This will help with permissions: http://codex.wordpress.org/Changing_File_Permissions. You may need to contact your host to find out the best way to set this up.

    PHP extensions will depend on how your host installed PHP. Sometimes PHP needs to be compiled with an –enable-ftp flag. Best idea is to talk to your host.

    Thread Starter tastewar

    (@tastewar)

    Without enumerating directories to their deepest levels, it appears that all directories relevant to WP are at 755, and all files are at 644. My reading of the doc you pointed out suggests this ought to be compatible with WP.

    Are there any specific files I should look at that would cause the update failures I’m experiencing?

    Thread Starter tastewar

    (@tastewar)

    Ok, working together with my ISP, this has been solved. I won’t claim to understand it completely, but as I understand it, the crux of the issue had to do with the account under which WP runs. On the problematic site, the WP process runs as ‘nobody.’ Running a script to touch all php files as follows:

    // Script to fix .php files in main Coppermine directory
    //     to run under user's ID as CGI script
    // - Adds shebang line to beginning of each php script
    // - Changes php file permissions to 0755

    Has fixed the problem, with the side effect that in the admin UI the text

    #!/usr/bin/php

    appears pretty frequently. Also did not notice any actual change in file permissions. Have not noticed any side effects in the main (consumer) UI.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘problem with automatic update — won't accept valid ftp credentials’ is closed to new replies.