Use the Ruby chmod_r function