[wp-trac] [WordPress Trac] #62718: Automatic updater of WordPress always fails if FS_METHOD is ftpext since 6.6 with PHP 8.0+
WordPress Trac
noreply at wordpress.org
Wed Mar 26 11:45:41 UTC 2025
#62718: Automatic updater of WordPress always fails if FS_METHOD is ftpext since
6.6 with PHP 8.0+
-------------------------------------------------+-------------------------
Reporter: hideishi | Owner:
| SergeyBiryukov
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.9
Component: Upgrade/Install | Version: 6.6
Severity: major | Resolution:
Keywords: needs-unit-tests has-testing-info | Focuses:
changes-requested reporter-feedback |
-------------------------------------------------+-------------------------
Comment (by hideishi):
By the way, let me also explain why there is a use case of using ftpext
rather than direct for automatic updates.
In shared hosting, it is common that PHP runs as your UID and GID.
Therefore, FS_METHOD direct works fine since file/directory owner is the
same as PHP user.
In typical enterpise servers (Linux, AIX, whatever you want), it is common
that PHP (and Apache) runs as **www** user. However, this www user is
acutally not allowed to login directly from security policy.
In this scenario, you will have a separate account (say myuser). So,
actual contents such as HTML contents as well as PHP codes (WordPress) is
stored on the location where myuser is uploadable. Since the
file/directory is owned by myuser, it is different from the user that runs
PHP (www).
Here, we use FSMETHOD=ftpext to force PHP to also access the
file/directory via FTP so that the file/directory owners will be kept as
myuser and not be overwritten (or probably forbidden) by accessing by www
user.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62718#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list