Linux-warning Insecure world writable dir解决办法
运行rails c、rails -v或者rails server的时候都会出现下面的错误 :

warning: Insecure world writable dir /usr/local/lib/nodejs/node-v14.16.1-linux-x64/bin in PATH, mode 040777
虽然不影响使用,但看着很不爽,777是权限全开,随便哪个人都可以访问,读取、写入,自然会报警,咱希望显示的东西越少越好,这样注意力才会更集中,解决办法:
sudo chmod go-w -R /usr/local/lib/nodejs
一切正常了:

服务器也没毛病了:

chmod中的g表示在组中的其它用户,o表示不在此组中的用户,-w表示去掉写权限,相关chmod的原英文解释如下:
A combination of the letters ugoa controls which users' access to the file will be changed: the user who owns it(u), other users in the file's group (g), other users not in the file's group (o), or all users (a). If none of these are given, the effect is as if (a) were given, but bits that are set in the umask are not affected.
The operator + causes the selected file mode bits to be added to the existing file mode bits of each file; - causes them to be removed; and = causes them to be added and causes unmentioned bits to be removed except that a directory's unmentioned set user and group ID bits are not affected.
想要查看更多chmod的使用方法,可以在linux服务器中输入:
man chmod
man命令会显示出后面命令的所有帮助信息。