Issue #4507 has been reported by Oleg Shaldybin.

----------------------------------------
Bug #4507: FileUtils.cp in 1.9 doesn't preserve permissions unless :preserve is set
http://redmine.ruby-lang.org/issues/4507

Author: Oleg Shaldybin
Status: Open
Priority: Normal
Assignee: 
Category: lib
Target version: 1.9.3
ruby -v: ruby 1.9.3dev (2011-03-18 trunk 31122) [x86_64-darwin10.6.0]


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.


-- 
http://redmine.ruby-lang.org