首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

linux权限的有关问题

2012-03-09 
linux权限的问题比方说,我建立一个文件夹 test 其权限是 777然后用帐号a在test 下建立文件 touch a1然后帐

linux权限的问题

比方说,我建立一个文件夹 test 其权限是 777

然后用帐号a在test 下建立文件 touch a1

然后帐号a退出,切换到b帐号,也到test目录下,然后用vi a1对其编辑,然后:wq发现保存失败,提示该文件是可读性的,不能修改。但是,我用wq!就能强行保存,而且保存后,其文件a1的所有者也变为b帐号了,这让我不可理解,请解释。



[解决办法]
前面不是刚有人问了一样的问题:
http://topic.csdn.net/u/20111224/19/5c06b957-f07d-4737-b80a-ef661b6b623d.html?15467
[解决办法]
这没什么好解释的,vim中输入:help :w看帮助:

:w[rite]! [++opt] Like ":write", but forcefully write when 'readonly' is
set or there is another reason why writing was
refused.
Note: This may change the permission and ownership of
the file and break (symbolic) links. Add the 'W' flag
to 'cpoptions' to avoid this.

热点排行