WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#23589 closed defect (bug) (fixed)

FS_CHMOD_FILE doesn't work for ssh

Reported by: x-yuri Owned by: dd32
Milestone: 3.7 Priority: normal
Severity: normal Version: 3.5.1
Component: Filesystem API Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Steps to reproduce:

  1. set up ssh access for WordPress (FTP_* constants).
  2. define('FS_CHMOD_FILE', 0664).
  3. install some theme.

Expected result: files have 0664 permissions.

Actual result: files have default permissions (0644).

I believe this happens because filename is ltrimmed before sending over SSH, but not restored before changing permissions. See this.

Change History (3)

#1 @SergeyBiryukov
8 years ago

  • Description modified (diff)

#2 @dd32
7 years ago

  • Milestone changed from Awaiting Review to 3.7

#3 @dd32
7 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 25306:

WP_Filesyste: SSH2 PHP Extension support: Fix a case where defining a custom FS_CHMOD_FILE / FS_CHMOD_DIR constant wouldn't take effect due to chmod() failing with a invalid path. Fixes #23589

Note: See TracTickets for help on using tickets.