看板Linux
标 题Re: [问题] Can't open file for writing
转信站ptt!ctu-reader!ctu-peer!news.nctu!newshub.sdsu.edu!flpi089.ffdc.sbc.co
[email protected] wrote:
> ※ 引述《psboy (屠牛特攻队)》之铭言:
> : ※ 引述《myCrystal ( )》之铭言:
> : : Ubuntu
> : : 用vim /etc/profile
> : : 这个档案权限是
> : : -rwxr--r-- 1 root root 497 2008-04-23 01:49 /etc/profile
> : : 请问一下,为什麽在vim :w!
> : : 会有erroe msg : Can't open file for writing
> : : 自己是用install 时候的account login。
> : : 请问是什麽问题? thanks
> : 你要不要先看看自己是用哪个使用者在干嘛 @_@
> : 搞清楚/etc/profile的读写权限
> : 再看看能用甚麽方式解决?
> : -
> : 好啦
> : 其实一行sudo vim /etc/profile应该就能解决
> : 只是想说进vim时应该已经跟你警告过
> : 你正在编辑一个唯读的档案
> : 你没看到吗?
> 请问,为什麽这是一个read-only file
> 原本权限是
> -rw-r--r-- 1 root root 497 2008-04-23 01:49 /etc/profile
> 我把它改成
> -rwxr--r-- 1 root root 497 2008-04-23 01:49 /etc/profile
>
> 可r 可w,为什麽还是一个read-only file ?
> 是什麽决定它是read-only file
看看吧!!
http://linux.vbird.org/linux_basic/0210filepermission.php