Thanks a lot Philip - a simple typo "owner" -> "owners" meant that
the data did not reach the engine. Fixed in svn.

M

Montgomery, Philip wrote:
> I am using cfengine version 3.0.0b9 on a RHEL5 x86 system.
> 
>  
> 
> I started off using examples provided in the 3.0 documentation, however,
> I have ran into issues with changing file ownership.  If I create a
> files section and specify an owner for a file, cfengine does not change
> the ownership of the file.
> 
>  
> 
> Here is a streamlined promises.cf that I used for testing:
> 
>  
> 
> body common control
> 
> {
> 
> bundlesequence  => {
> 
>                    "main"
> 
>                    };
> 
> }
> 
> #######################################################
> 
>  
> 
> body runagent control
> 
> {
> 
> hosts => { "127.0.0.1:5308" };
> 
> }
> 
> #########################################################
> 
> bundle agent main
> 
> {
> 
> files:
> 
>   "/tmp/foo" perms        => p("root","0700");
> 
> }
> 
> #########################################################
> 
> body perms p(user,mode)
> 
> {
> 
> owners => { "$(user)" };
> 
> mode   => "$(mode)";
> 
> }
> 
>  
> 
> Here is the relevant section of verbose output from cfagent:
> 
>  
> 
>  
> 
> cf3    =========================================================
> 
> cf3    files in bundle main
> 
> cf3    =========================================================
> 
> cf3
> 
> cf3
> 
> cf3     .........................................................
> 
> cf3         /tmp/foo
> 
> cf3     .........................................................
> 
> cf3
> 
> cf3  -> Using file literal base path /tmp/foo
> 
> cf3  -> File permissions on /tmp/foo as promised
> 
> cf3 Nothing promised for [files.perms.owners.mode.._tmp_foo] (0/1
> minutes elapsed)
> 
>  
> 
>  
> 
> Thanks,
> 
>  
> 
> -Phil
> 
> 
> 
> This e-mail, and any documents or data attached hereto, is intended for
> the intended recipients only. It may contain confidential and/or
> privileged information and no rights have been waived by the sender. If
> the reader of this message is not the intended recipient, or the
> employee or agent responsible for delivering the message to the intended
> recipient, you are hereby NOTIFIED that any dissemination, distribution,
> retention, archiving or copying of this communication is strictly
> prohibited.  If you have received this e-mail in error, please notify me
> at the telephone number shown above or by return mail and delete this
> communication and any copy immediately. MEC provides no assurances that
> this e-mail and its attachments are virus free; you are responsible for
> scanning all e-mails and attachments for viruses.  MEC disclaims all
> liability for damages caused by any virus which may be transmitted by
> this email.  Thank you.        
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Bug-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/bug-cfengine

-- 
Mark Burgess

-------------------------------------------------
Professor of Network and System Administration
Oslo University College, Norway

Personal Web: http://www.iu.hio.no/~mark
Office Telf : +47 22453272
-------------------------------------------------
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to