[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using cvs to contol system files

From: Jenn Vesperman
Subject: Re: using cvs to contol system files
Date: 24 Oct 2002 10:15:27 +1000

On Thu, 2002-10-24 at 05:21, address@hidden wrote:
> Has anyone out there used to cvs to version control system files?
> For instance, files in /etc.
> I'm working with 2 system admins who want to do this. We were going to make
> the 'live' files a sandbox that they would share. I was hoping to have them
> edit files by logging in to their regular accounts, su to root, edit a file,
> exit su, cvs commit filename.
> The problem is the permissions involved. They each have a umask of 022 on
> regular accounts. So a 'cvs add dirName' creates a directory in the repository
> without group write. No problem, we'll set this one by hand. 
> The CVS/Entries file however is left as owned by the last user to commit and
> without a group write. This is a problem for the next admin to commit.
> Is there a way around this. Setting the umask in the admins regular accounts
> to 002 seems like a poor option.
> Just getting started on this problem. Any advice is appreciated.

The way I do it is use cvs with make.

Use CVS to store secure versions of the files, then every time you want
to modify them, create a sandbox, make your changes, then run 'make'.
EG, for a set of mail files for a bunch of machines:

cvs -d (repository) checkout mail
cd mail
vi (host).aliases
cvs commit

The make script copies the changed aliases file to the proper host and
directory, ensures permissions and ownerships are correct and runs
newaliases. (It would probably be 'safer' if it did a cvs export of the
relevant file instead of copying the sandbox version, but this is just a
home network so some imperfections are ok. (G) )

You could also have a script that runs whenever a change is committed,
that does the export/check permissions/run stuff like 'newaliases' or
restart services.

Jenn V.
    "Do you ever wonder if there's a whole section of geek culture 
                you miss out on by being a geek?" - Dancer.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]