wp-admin/includes/class-wp-filesystem-ssh2.php:448Changes the owner of a file or directory.
$filestring$ownerstring|int$recursivebooloptionalfalsebool public function chown( $file, $owner, $recursive = false ) { if ( ! $this->exists( $file ) ) { return false; } if ( ! $recursive || ! $this->is_dir( $file ) ) { return $this->run_command( sprintf( 'chown %s %s', escapeshellarg( (string) $owner ), escapeshellarg( $file ) ), true ); } return $this->run_command( sprintf( 'chown -R %s %s', escapeshellarg( (string) $owner ), escapeshellarg( $file ) ), true ); }Introduced in 2.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-admin/includes/class-wp-filesystem-ssh2.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.