Bug #4507

FileUtils.cp in 1.9 doesn't preserve permissions unless :preserve is set

Added by Oleg Shaldybin about 3 years ago. Updated almost 3 years ago.

[ruby-core:35518]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
Category:lib
Target version:1.9.3
ruby -v:ruby 1.9.3dev (2011-03-18 trunk 31122) [x86_64-darwin10.6.0] Backport:

Description

=begin
By default /bin/cp preserves file permissions when copying a file, -p flag is meant for preserving uid, gid, mtime etc. However with FileUtils.cp in 1.9 permissions are only copied when :preserve => true option is given. I think the least surprise behavior would be to mimic cp behavior.

Patch is attached.
=end

fileutils_cp_permissions.patch Magnifier (1.48 KB) Oleg Shaldybin, 03/18/2011 06:57 AM

History

#1 Updated by Koichi Sasada almost 3 years ago

  • Assignee set to Nobuyoshi Nakada

#2 Updated by Nobuyoshi Nakada almost 3 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Fixed at r31123. Thank you.

Also available in: Atom PDF