# File lib/chef/provider/file.rb, line 130 def set_mode unless compare_mode && @new_resource.mode != nil Chef::Log.info("Setting mode to #{sprintf("%o" % octal_mode(@new_resource.mode))} for #{@new_resource}") # CHEF-174, bad mojo around treating integers as octal. If a string is passed, we try to do the "right" thing ::File.chmod(octal_mode(@new_resource.mode), @new_resource.path) @new_resource.updated_by_last_action(true) end end