Insecure file access in the world / Users / username in PATH, mode 040777 when running Ruby commands

When I run Ruby commands such as gem -v , I get this error:

/Users/kristoffer/.rvm/rubies/ruby-1.9.2-p180/bin/gem:4: warning: unsafe world writable / Users / kristoffer in PATH, mode 040777

1.6.2

First of all, I don’t understand what this means. / Users / kristoffer is not on my way according to echo $PATH . The result of echo $PATH is:

/Users/kristoffer/.rvm/gems/ruby-1.9.2-p180/bin:/Users/kristoffer/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/kristoffer/.rvm/ rubies / ruby-1.9.2-p180 / Bin: /Users/kristoffer/.rvm/bin: / USR / bin: / bin: / USR / SBIN: / SBIN: / USR / local / bin: / USR / X11 / Ben

As you can see, PATH is pretty clean. Only the default path + add RVM.

I saw other posts similar to this, where the recommended way to solve the problem is to run chmod go-w path/to/folder

However, I’m sure it’s a bad idea to make my home folder unusable, right? I fixed the permissions using Disk Utility and it did not find anything wrong with the permissions for my home folder.

Any idea what the problem is and how can I fix it?

+52
ruby path permissions macos
May 31 '11 at 18:40
source share
6 answers

Your home folder should be accessible only to you, and not by anyone else. The reason for this bug is that you have folders in your PATH that are inside your (insecure) home folder, which means that anyone who wants to can hack you by renaming / moving your .rvm folder and replacing it impostor.

To fix the home folder, run chmod go-w /Users/kristoffer . If there are any other unsafe folders in your PATH, you should fix them the same way.

By the way, the reason the Disk Utility did not repair this is because it restores only files installed as part of the OS (see Apple KB article on this subject ). There is the possibility of fixing the rights to the home folder if you boot from the installation DVD and run Password Reset from the Utilities menu, but I'm not sure if it resets the permissions themselves or simply owns them.

+89
Jun 01 2018-11-11T00:
source share

I continued to receive this at my invitation.

enter image description here

I could not figure it out from my command line, but it ended up working.

enter image description here

+9
Aug 27 '13 at 4:33
source share

This recently happened to me, and this is due to an error when upgrading to Mac OSX 10.9.3. It seems that the update changes the permissions in the user folder. Here's an explanation and correction:

http://derflounder.wordpress.com/2014/05/16/users-folder-being-hidden-with-itunes-11-2-installed-and-find-my-mac-enabled/

+5
May 17 '14 at 14:39
source share
 chmod 755 /Users/<username> 

Fix the problem ...

+3
Aug 04 '14 at 17:29
source share

it says that the Users / username directory is not safe, you can fix it by running sudo chmod go-w Users / username

+1
Apr 15 '14 at 20:42
source share

I have found a solution. As user2952657, I received this warning with a tramp after upgrading to OSX 10.9.3. Updating iTunes to 11.2.1 was all that was needed to stop the warning.

+1
May 18 '14 at 17:01
source share



All Articles