Thursday, August 8, 2013

Re: vim vs nano on editing system files

On Thursday, August 8, 2013 7:43:42 AM UTC-5, Christian Brabandt wrote:
> On Thu, August 8, 2013 14:18, John Little wrote:
>
> > Interestingly, I find sudoedit ignores a lack of write permission.
>
>
>
> That is because you are editing a temporary file with sane
>
> permissions instead of the original file.
>
>
>
>
>
> regards,
>
> Christian

Thanks everyone for point me into the right direction. I guess the default behavior of vim is what it is.

Curiously, if the file permission is 644 and the file belongs to root, then a normal user does not even need sudo to override readonly, just use :w!. (and in addition, the ownership of the file would change from root to the user.) Whereas this is not possible in nano, i.e., only root and sudo have write permission in 644. Does anyone know why is this?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment