Every time I run this command rails server
:
warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
I searched for a solution here and they said to type: chmod go-w /usr/local/bin
But I get this error:
chmod: Unable to change file mode on /usr/local/bin: Operation not permitted
I am using OS X by the way.
Try:
sudo chmod go-w /usr/local/bin
The /usr/local/bin directory is owned by the
root
(i.e. administrator) account, so even if you can write to it, you can't change the permissions on it. Thesudo
command means "run the following command as root", and works a lot like clicking that lock icon in the System Preferences dialogs.You need to run
This should resolve your problem:
chmod go-w {/path/of/user}
I have had the same issue in OSX. It can be fixed by running Disk Utilities to Repair Permissions. I agree with Peter Nixey: in my case it is caused when my 3G dongle installs or reinstalls its driver. Repairing Permissions afterward fixes the issue.
If you're running OSX and getting this often, another good thing to consider is to use a built-in OSX permissions fixing tool. If you didn't change the mode of your directories, something else did and there's a chance that other directories have overgenerous permissions as well - this tool will reset them back all to factory defaults, which is a good security idea. There's a great guide on the Apple stackextange about this very process.
Even I came across similar problem. I use KDE on ubuntu 12 and while playing around in my home folder I had accidently changed permissions for Group and Others as "can view and modify content" by right clicking in my home folder and then properties and forgot all about it.
My warning was:
So in my case it was the home folder. I did undid the modifications of permissions and I stopped getting those warnings when running the rails server or rake tasks to run my tests.