edeca.net logo
  • rss
  • Home
  • Graphics
  • Computing
    • ROT Util
    • MOTD maker
    • GNU screen config
    • VB6 reverse DNS
    • VB6 RichTextBox control
  • About

vim vs. Linux extended ACLs

David | August 2, 2009

Extended ACLs on Linux can be incredibly useful.  Permissions can actually be more secure whilst allowing a number of users or daemons access to a file, no longer are unwieldy groups necessary to allow reading or writing.  But for some reason, I noticed that these extended ACLs disappeared when a file was edited in vim.

The solution is very simple, you just need to set backupcopy=yes in your .vimrc. Note that backupcopy=auto currently does not work.

The way that vim normally works is to rename the file you are working on and write a new file.  This is fast and means that no files have to be deleted.  Unfortunately, it also means that any special attributes that vim does not understand are lost.

Setting backupcopy=yes ensures that the original file is copied and then overwritten upon save.  This takes a little longer, but will preserve the attributes correctly.  More information can be found in the topic :help backupcopy inside vim.

You can check this page for a quick rundown or this one for a longer explanation on how ACLs work in Linux.

Categories
Computing
Tags
linux, vim
Comments rss
Comments rss
Trackback
Trackback

« Proxy auth bugs, round three Using iTunes with media keyboards »

Leave a Reply

Click here to cancel reply.

Categories

  • Computing
  • Electronics
  • General

Archives

  • February 2010
  • January 2010
  • November 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009

Links

  • My photo gallery
  • Pookey's site

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox