From 0050998801cabab21245452be315236d7d84da6b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 19 Jun 2020 10:38:08 +0000 Subject: [PATCH] Filesystem API: Expicitly set directory permissions in `WP_Filesystem_SSH2::mkdir()`. This ensures the permissions are correct after a directory is created with `ssh2_sftp_mkdir()`, which appears to be affected by system `umask` settings. Props bbrdaric. Fixes #49218. Built from https://develop.svn.wordpress.org/trunk@48090 git-svn-id: http://core.svn.wordpress.org/trunk@47857 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-filesystem-ssh2.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-filesystem-ssh2.php b/wp-admin/includes/class-wp-filesystem-ssh2.php index 7ee9f9a78f..4ed94ea067 100644 --- a/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -695,6 +695,9 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { return false; } + // Set directory permissions. + ssh2_sftp_chmod( $this->sftp_link, $path, $chmod ); + if ( $chown ) { $this->chown( $path, $chown ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index b56809469e..d78145e1f6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-48089'; +$wp_version = '5.5-alpha-48090'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.