[wp-trac] [WordPress Trac] #23589: FS_CHMOD_FILE doesn't work for ssh
WordPress Trac
noreply at wordpress.org
Sat Feb 23 00:19:11 UTC 2013
#23589: FS_CHMOD_FILE doesn't work for ssh
--------------------------+------------------------------
Reporter: x-yuri | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Filesystem | Version: 3.5.1
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Description changed by SergeyBiryukov:
Old description:
> Steps to reproduce: 1) set up ssh access for wordpress (FTP_* constants),
> 3) define('FS_CHMOD_FILE', 0664), 2) 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
> [https://github.com/WordPress/WordPress/blob/master/wp-admin/includes
> /class-wp-filesystem-ssh2.php#L164 this].
New description:
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
[http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/includes
/class-wp-filesystem-ssh2.php#L164 this].
--
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23589#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list