Scottdob,

I seem to have gotten the same issue still.

Here is the cf file after implementing your recommendation.

"cat /tmp/toe_in_the_water.cf
# toe in the water
body common control
{
        bundlesequence => { "copyFile" };
        ignore_missing_bundles => "true";
        require_comments => "true";
        inputs => { ".cfagent/inputs/cfengine_stdlib.cf" };
}

body server control
{
allowconnects         => { "127.0.0.1" , "1.2.3" };
allowallconnects      => { "127.0.0.1" , "1.2.3" };
trustkeysfrom         => { "127.0.0.1" , "1.2.3" };
}

bundle server access_rules()
{
        access:
                "/tmp/toe_in_water_folder_create/"
                comment => "provide access to folder",
                admit => { "1.2.3.4" };  #or whatever IP address/address range 
you want to be able to access that directory
}

bundle agent copyFile
{
        files:
                "/tmp/toe_in_water_folder_create/toe_in_water_file_copy.txt"
                comment => "copyFile copy main file",
                copy_from => 
local_cp("/tmp/toe_in_water_folder_create/toe_in_water_file_create.txt");

                "/tmp/toe_in_water_folder_create/host_from_remote"
                comment => "copyFile copy from remote",
                copy_from => secure_cp("/etc/hosts","1.2.3.4");"

Error received:
"cf3>     .........................................................
cf3>     Promise handle:
cf3>     Promise made by: /tmp/toe_in_water_folder_create/host_from_remote
cf3>
cf3>     Comment:  copyFile copy from remote
cf3>     .........................................................
cf3>
cf3>  -> Copy file /tmp/toe_in_water_folder_create/host_from_remote from 
/etc/hosts check
cf3> No existing connection to 1.2.3.4 is established...
cf3> Set cfengine port number to 5308 = 5308
cf3> Set connection timeout to 10
cf3>  -> Connect to 1.2.3.4 = 1.2.3.4 on port 5308
cf3>  -> Did not find new key format /var/cfengine/ppkeys/root-.pub
cf3>  -> Trying old style /var/cfengine/ppkeys/root-1.2.3.4.pub
cf3>  -> Could not map key file to new format - we have no digest yet (using 
/var/cfengine/ppkeys/root-1.2.3.4.pub)
cf3>  -> Going to secondary storage for key
cf3> Couldn't send
cf3>  !!! System error for send: "Connection reset by peer"
cf3> Couldn't send
cf3>  !!! System error for send: "Broken pipe"
cf3> Couldn't send
cf3>  !!! System error for send: "Broken pipe"
cf3> Challenge response from server 1.2.3.4/1.2.3.4 was incorrect!
cf3> I: Report relates to a promise with handle ""
cf3> I: Made in version 'not specified' of '/tmp/toe_in_the_water.cf' near line 
48
cf3> I: Comment: copyFile copy from remote

cf3>  !! Authentication dialogue with 1.2.3.4 failed
cf3> Unable to establish connection with 1.2.3.4
cf3>  -> No suitable server responded to hail
cf3> Promise (version not specified) belongs to bundle 'copyFile' in file 
'/tmp/toe_in_the_water.cf' near line 48
cf3> Comment: copyFile copy from remote"

Regards,
j

-----Original Message-----
From: help-cfengine-boun...@cfengine.org 
[mailto:help-cfengine-boun...@cfengine.org] On Behalf Of no-re...@cfengine.com
Sent: Tuesday, May 31, 2011 12:23 PM
To: help-cfengine@cfengine.org
Subject: Cfengine Help: Re: Cfengine Help: Cannot copy files to remote host

Forum: Cfengine Help
Subject: Re: Cfengine Help: Cannot copy files to remote host
Author: scottdob
Link to topic: https://cfengine.com/forum/read.php?3,22330,22337#msg-22337

You also might need to add this bundle for access permissions.  It tells the 
server which directories specified remote hosts have access to.  Nice little 
security feature of cfengine.  As long as cfengine is allowed to access the 
parent directory, it can access the child directories as well

bundle server access_rules()
{
access:
    "/tmp/toe_in_water_folder_create/"
       admit => { "192\.168\..*" };  #or whatever IP address/address range you 
want to be able to access that directory
}

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to