博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
vi run as root gives error accessing .exrc
阅读量:2347 次
发布时间:2019-05-10

本文共 1604 字,大约阅读时间需要 5 分钟。

今天有用户在使用某个内部工具时遇到这样一个问题:

 

 

Not owner of .exrc or .exrc is group or world writableError detected in .exrc.[Hit return to continue]
  他说这个问题只在某些server上存在,大多数server上不会遇到。上穷碧落下黄泉地在公司内部搜索了一遍,没发现有用的信息。 郁闷中想起Google,于是试了一下,结果却是大喜过望,原来这是一个常见的vi引起的问题。 有详细的解释,转载如下:   
Description
If a user has a $HOME/.exrc file, and runs vi while su'ed to root,the error:Not owner of .exrc or .exrc is group or world writableError detected in .exrc.[Hit return to continue]
Work Around
set the EXINIT environment variable. Please search the vi man pages for "EXINIT" for infomation on this.Here's is what I added to my .cshrc file:setenv EXINIT 'set tabstop=4 wrapscan nomesg | map @4 :set tabstop=4^M |map @8 :set tabstop=8^M | map @L :set list^M | map @l :set nolist^M |map @n :w/!^M:n^M | map @N :n^M | map @r :w/!^M:rewind^M|map @R:rewind/!^M |map @W :w/!^M^Z | map @D Oopen(DB,">>/tmp/dbgdrc");^Mprint DB"/n";^Mclose(DB);^['NOTES:1) ^M is a ctrl-M (entered as ctrl-v ctrl-m) and ^[ is an escapecharacter (ctrl-v Esc).2) The '!' has to be escaped with the backslash to prevent it beinginterpreted by the shell.3) Everything between the single quotes is on a single line. It isbroken here for readability.4) Rename/delete the .exrc file or you'll get the same error as before. xxxxx@xxxxx.com 2004-12-10 23:57:36 GMT
Comments
N/A
给出了更简洁的方法:
To avoid error "Not owner of .exrc or .exrc is group or world writable" in vi -- Posted by inturi on Wednesday, January 23 2008 set this environment variable export EXINIT="set noexrc"
 

 

你可能感兴趣的文章
Python3学习教程
查看>>
Python3学习笔记01-第一个Python程序
查看>>
Laravel5学生成绩管理系统-01-安装-建表-填充数据
查看>>
Mac OSX下使用apt-get命令
查看>>
Mac下安装PHP的mcrypt扩展的方法(自己总结的)
查看>>
关于html_entity_decode、空格 以及乱码
查看>>
Box2d no gravity
查看>>
mario collision
查看>>
tiled 地图工具
查看>>
小游戏
查看>>
旋转关节绳子
查看>>
射箭box2d
查看>>
cocos2d iphone-wax cocowax
查看>>
angribird level editor
查看>>
love2d 苹果运行
查看>>
GridBagLayout 的注意
查看>>
ajax 跨域iis6 设置
查看>>
4.0版本改动
查看>>
IE8 9 ajax no-transport ajax 问题
查看>>
oracle 启动dbconsole
查看>>