Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#24277 closed defect (bug) (fixed)

chgrp and chown don't work for Filesystem over SSH2

Reported by: nacin's profile nacin Owned by: dd32's profile dd32
Milestone: 3.6 Priority: normal
Severity: normal Version:
Component: Filesystem API Keywords: has-patch commit
Focuses: Cc:


As found using a static analyzer in #24210 (from rlerdorf).

Looks to be copy-pasted from the chmod method. Attaching a patch that I think does the trick.

Attachments (1)

24277.diff (1.4 KB) - added by nacin 11 years ago.

Download all attachments as: .zip

Change History (6)

11 years ago

#1 @nacin
11 years ago

  • Owner set to dd32
  • Status changed from new to assigned

#2 @dd32
11 years ago

I have no ability to test the SSH2 transport at present, but the patch looks sane, chgrp looks correct, chown looks correct. I don't have a spare VM to test in right now, so if someone who has access to the SSH2 extension wants to give it a whirl, it'd be much appreciated.

I personally want to see it removed from core in preference for the plugin: #16925 - The plugin uses pure PHP and doesn't rely on the SSH2 PHP extension, so it's more compatible generally

#3 @dd32
11 years ago

  • Keywords commit added

#4 @dd32
11 years ago

Also worth noting here, that FTP does not currently support either of these methods, only Direct (and SSH2 which is broken prior to this patch).

#5 @nacin
11 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 24626:

Fix the chown and chgrp methods for the filesystem API's SSH2 transport. fixes #24277.

Note: See TracTickets for help on using tickets.