[Linux-disciples] Setting user and group rights automatically in vim

Stephen R Laniel linux-disciples@bostoncoop.net
Wed, 29 Oct 2003 12:37:26 -0500


The blogging package that I use (blosxom) works by grabbing all the files
under a given point in the filesystem tree and displaying them in date
order. One blosxom plugin I use adds metadata to each text file, for
whatever reason. The plugin runs under user www-data, whereas when I
create a new file in vim its user:group is slaniel:slaniel. So the meta
plugin doesn't work unless I manually change the owner on the file. I get
errors like this in my /var/log/apache/error.log:

/*
Unable to update date meta-tag on /home/slaniel/public_html/blosxom/posts_and_data/politics_and_policy/bush_war_on_terror_iraq_etc.txt
*/

So: is there any way to configure vim so that whenever it creates a new
file under a specific path, it creates that file with a specific user,
group, and permissions?

-- 
``The Defensive Department was founded in the mid-1960s to manage the
  official U.S. position on the Vietnam War. The department has recently
  come under fire for the size of its budget, which is currently larger
  than at any time since Richard Nixon was in office.''
 -http://www.theonion.com/3942/news1.html