Skip to content
Browse files

Comply with current umask when generating new app:

  When creating a new application using the default rails generator
(`rails new my_app`), it will apply some permissions bypassing the
current process umask. The `bin' directory and any files inside it will
always be set a mode of 0755.

  This change removes the current umask bits from the mode applied by
the generator on the `bin' directory and its content.
  • Loading branch information...
1 parent 974335d commit 1cb50949035d850a85ad0c9d0b6bd424af83a01a @tjouan tjouan committed Aug 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/lib/rails/generators/rails/app/app_generator.rb
2 railties/lib/rails/generators/rails/app/app_generator.rb
@@ -68,7 +68,7 @@ def bin
directory "bin" do |content|
"#{shebang}\n" + content
- chmod "bin", 0755, verbose: false
+ chmod "bin", 0755 & ~File.umask, verbose: false
def config

0 comments on commit 1cb5094

Please sign in to comment.
Something went wrong with that request. Please try again.