help-cfengine
[Top][All Lists]
Advanced

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

Re: owner and group in files and copy


From: Christian Pearce
Subject: Re: owner and group in files and copy
Date: Thu, 07 Oct 2004 11:27:41 -0400

hmm... It was definitely happening to me.  What version do you run?  I
am using 2.1.10.  I am trying to reproduce it on a smaller snippet of
code.  I was pulling files from the Cfengine server.  Take a look at the
code though.  It does save the uid and gid.

On Thu, 2004-10-07 at 10:13, Ed Brown wrote:
> In my experience, and in a test just now, setting destination ownership 
> for one copy statement does not carry over to subsequent copy
> statements.  The default behavior in the absence of explicit settings is
> to preserve the ownership of the source file.
> 
> -Ed
> 
> 
> On Wed, 2004-10-06 at 19:00, Chris Edillon wrote:
> > On Wed, 2004-10-06 at 13:17, Christian Pearce wrote:
> > > Why does the owner or group get carried over to the next copy statement
> > > executed?  I briefly looked at the code, it looks like it saves the uid
> > > and gid.  So it was intentionally as far as I can tell.
> > > 
> > > I can't for the life of my figure out why we would want this.  I am
> > > going to be forced to explicitly set ownership for every copy statement
> > > I have.  Geehz!  Can someone explain why this is here?
> > > 
> >   i would think that if it wasn't there, you would be
> > forced to explicitly set ownership for every copy statement
> > anyway (assuming that not doing so implies the owner and
> > group that cfagent runs as).  by storing that information,
> > you can cluster copy statements which all set the same
> > owner and group.  i have no idea if this was intentional
> > or a feature.
> >   i do like the idea of templates, though; has this been
> > discussed on the list before?  i've found the ability to
> > use nesting templates in nagios very useful in keeping a
> > clean set of configuration files where identical information
> > is expressed numerous times.  i dont know that i'd find it
> > as useful in cfengine config files but it's worth discussing.
> > 
> > > There was the thought of having a template for copy statements
> > > 
> > > template:
> > > 
> > >         root_executable
> > >                 owner=root
> > >                 group=root
> > >                 mode=0755
> > >                 server=$(server)
> > > 
> > > copy:
> > > 
> > >         /var/tmp/somefile/
> > >                 dest=/var/tmp/somefile
> > >                 template=root_executable
> > > 
> > > This seems like a good idea.
> > 
> > 
> > 
> > _______________________________________________
> > Help-cfengine mailing list
> > Help-cfengine@gnu.org
> > http://lists.gnu.org/mailman/listinfo/help-cfengine
> 
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
-- 
Christian Pearce
http://www.commnav.com
http://www.perfectorder.com






reply via email to

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