From: nobu@... Date: 2014-04-16T14:32:39+00:00 Subject: [ruby-core:62062] [ruby-trunk - Bug #9748] [Rejected] FileUtils.cp always preserve the permission of original files Issue #9748 has been updated by Nobuyoshi Nakada. Description updated Status changed from Open to Rejected It is same as `cp` command. ---------------------------------------- Bug #9748: FileUtils.cp always preserve the permission of original files https://bugs.ruby-lang.org/issues/9748#change-46237 * Author: Wei Hu * Status: Rejected * Priority: Normal * Assignee: * Category: * Target version: * ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- `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/