[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 12:23:43 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 |
-------------------------------------------------+-------------------------
Changes (by SirLouen):
* keywords: needs-unit-tests has-testing-info changes-requested reporter-
feedback => needs-unit-tests has-testing-info changes-requested
Comment:
> 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.
Sure, makes a lot of sense. Now I'm going to explain to you my testing
protocol:
For testing purposes, we use https://github.com/wordpress/wordpress-
develop/
Here I prepared an FTP patch https://github.com/WordPress/wordpress-
develop/pull/8589 to test this
To configure it with an FTP running in container `ftp`
The sequence of commands would be:
{{{
> git clone https://github.com/wordpress/wordpress-develop/
> cd wordpress-develop
> git fetch origin pull/8589/head:ftp-docker-support
> git checkout ftp-docker-support
> npm install
> npm run build:dev
> cp .env.example .env
> sed -i 's/LOCAL_FTP=false/LOCAL_FTP=true/' .env.example
> npm run env:start
> npm run env:install
}}}
And then you can add to `wp-config.php`
{{{
define( 'FS_METHOD', 'ftpext' );
define( 'FTP_USER', 'admin' );
define( 'FTP_PASS', 'password' );
define( 'FTP_HOST', 'ftp' );
define( 'FTP_SSL', false );
}}}
WP admin and password are, admin and password respectively also.
Now you can use in an easily reproducible environment by anyone on your
computer and get to see the errors I'm commenting
The problem is that with such errors, I cannot exactly reproduce your bug
report🤦‍♂️. So I'm trying to see if I can create the environment first.
Anyway, now I got everything I need to keep it up.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62718#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list