How can I get vim to set an ACL on its swap files?

Posted by thsutton on Super User See other posts from Super User or by thsutton
Published on 2010-04-09T03:02:46Z Indexed on 2010/04/09 3:13 UTC
Read the original article Hit count: 320

Filed under:
|
|
|
|

I use vim on an OS X Snow Leopard Server machine. A number of the directories I work in have ACLs (so that various groups of users can access them over AFP) that are inherited. For some reason, when I'm working in one of these directories, vim cannot read it's own swap files. It can create them fine but can't read them which, for some reason, makes it display the "swap file already exists" message (and no, the swap file does not already exist).

vim -r lists the newly created swap file as "[cannot be read]". The owner and group are correct and the permissions are 0600, and the ACLs on the swap file and the file I'm editing are identical (as disclosed by ls -le and compared with diff). groups returns the same thing whether invoked from my login shell or via :! in vim.

Has anyone encountered (and hopefully resolved) a problem like this before?

© Super User or respective owner

Related posts about vim

Related posts about swap