[wp-hackers] Does WordPress do automatic updates as the user that owns the files?

Otto otto at ottodestruct.com
Mon Aug 20 22:02:00 UTC 2012

On Mon, Aug 20, 2012 at 3:41 PM, Harry Metcalfe <harry at dxw.com> wrote:
> It looks like this could be easily overridden, too, by setting FS_METHOD (or
> using the filesystem_method filter) and including a new, appropriately-named
> class in a plugin? Except there's a comment at
> wp-admin/includes/file.php:844 -
>> Please ensure that this is either 'direct', 'ssh', 'ftpext' or
>> 'ftpsockets'
> Which makes it sound like that's not possible?

It's possible. Look at the function WP_Filesystem around line 798. But
you'd also need to use the filesystem_method_file filter to return the
path to the file that contains your appropriately named class.


More information about the wp-hackers mailing list