WordPress.org

Forums

Plugin - upgrade automatically & FTP (4 posts)

  1. searchen
    Member
    Posted 6 years ago #

    On some of my blogs, the "upgrade automatically" works flawlessly. However on others (on different servers), I am always asked for the FTP approval, before the upgrade happens.

    Is this server related? Can I ask my server to activate something so that I don't need the FTP step?

    Thanks
    Peter

  2. richardgreen
    Member
    Posted 6 years ago #

    I see that the same issue, that on some servers, I cannot automatically upgrade plugins because I am asked to provide FTP credentials which don't exist.

    I don't get this use of FTP for the plugins. I don't even run (or want to run FTP on my servers). Nor would we know, without auditing the code, if this was some sort of phishing attack to get the FTP credentials of a server as the 2nd part to an attack for which the first part, to modify the admin areas to product such a dialog, had succeeded. In short, I don't think this is well thought out at all.

    php has plenty of functionality (curl, for instance) to get files via HTTP, which is more likely to be available than FTP in my view. I did come across something which suggested they use FTP to make the permissions of files read-only after an upgrade - again, I don't see why that can't just be done using native php functions.

    Having to upgrade plugins manually is pretty tedious, so I'm bumping your post in the hope that someone can explain why there are different behaviors, and how I can make automatically upgrade plugins without the FTP issue or step.

    Or did you manage to resolve this already?

    -Richard

  3. richardgreen
    Member
    Posted 6 years ago #

    I fixed this problem. Some files had incorrect ownership. The web server could read them but not write to them. When that happens, you are prompted to supply your FTP credentials (ugh, seem my previous comments).

    chown -R www-data:www-data /var/www/blog.example.com/htdocs/

    -Richard

  4. mazter
    Member
    Posted 5 years ago #

    Richard, thanks for the update, I followed your tip and I changed ownership of the files as well as chmod the files but still not helping to the situation. Is there anything else that you might have forgotton to mention here?

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic