From: usa@... Date: 2014-05-27T04:59:19+00:00 Subject: [ruby-core:62785] [ruby-trunk - Bug #9748] FileUtils.cp always preserve the permission of original files Issue #9748 has been updated by Usaku NAKAMURA. Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: DONE, 2.1: REQUIRED Backported into ruby_2_0_0 at r46158. ---------------------------------------- Bug #9748: FileUtils.cp always preserve the permission of original files https://bugs.ruby-lang.org/issues/9748#change-46901 * Author: Wei Hu * Status: Closed * Priority: Normal * Assignee: * Category: doc * Target version: * ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux] * Backport: 2.0.0: DONE, 2.1: REQUIRED ---------------------------------------- `FileUtils.cp` will always preserve the permission of original files even if we passed `:preserve=>false`. I think the problem is because: ~~~diff < File.open(dest, 'wb') do |f| --- > File.open(dest, 'wb', s.stat.mode) do |f| ~~~ -- https://bugs.ruby-lang.org/