-2

I am trying to learn Ruby on Rails and I keep getting this warning when I start up my server, the app still works I just want to get rid of the warning. I followed someone else on here's advice to adjust the permissions but I still get this error, can someone please help?

chmod go-w /Users/mitchmurphy/

/Users/mitchmurphy/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/app_rails_loader.rb:39: warning: Insecure world writable dir /Users/mitchmurphy/.rbenv/versions/2.2.1 in PATH, mode 040777 /Users/mitchmurphy/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/bundler-1.8.4/lib/bundler/shared_helpers.rb:83: warning: Insecure world writable dir /Users/mitchmurphy/.rbenv/versions/2.2.1 in PATH, mode 040777

user3689341
  • 143
  • 2
  • 11
  • possible duplicate of [warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777](http://stackoverflow.com/questions/3952243/warning-insecure-world-writable-dir-usr-local-bin-in-path-mode-040777) – Brad Werth Mar 12 '15 at 17:36

1 Answers1

1

chmod go-w /Users/mitchmurphy/ wasn't enough because it only changed the permissions on your home folder, but not all the folders under it.

You can do chmod -R go-w /Users/mitchmurphy/.rbenv which will remove write permissions to all the folders inside your rbenv directory recursively (the -R option) from everyone except you.

Explanation:
-R - recursive (apply to all folders under this one)
go - the 'people' it'd affect. In this case 'group' and 'others' (file and directory permissions are separated into three cases, owner group and others)
-w - this just means 'remove write'

Mario
  • 1,349
  • 11
  • 16
  • thanks so much! i tried chmod 644 and chmod 777 on that directory with no success, however that line of code worked perfectly! – user3689341 Mar 12 '15 at 17:47
  • 644 would have been fine. You were simply missing the -R option (recursive) since you need to remote write permissions from every folder under .rbenv, not just that folder – Mario Mar 12 '15 at 17:48