On Thursday, August 8, 2013 8:38:08 AM UTC-5, Christian Brabandt wrote: > On Thu, August 8, 2013 15:31, Dahong Tang wrote: > > > $ sudo touch testvim > > > $ ls -al > > > -rw-r--r-- 1 root root 0 Aug 8 08:25 testvim > > > $ vi testvim > > > :w! > > > :q > > > $ ls -al > > > -rw-r--r-- 1 user user 0 Aug 8 08:26 testvim > > > > > > I don't understand why vim would override both file permission and > > > ownership. Any ideas? > > > > I think, this is caused by the way, how vim writes the file, e.g. > > vim creates a new file with when writing it, deletes the old file and > > then renames the new file to the original filename and since you > > have writing permissions on the containing directory, this succeeds. > > > > I tried playing around with the backup, writebackup and backupcopy > > options, but couldn't convince vim to actually try to overwrite the file. > > > > regards, > > Christian
Ok, vim looks at the file permission in the context of the directory permission. TRICKY. Wish it is more straight forward, But oh well. Thank you!! -- -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
