Copy-config from candidate to running

Netconf copy-config from candidate to running return error with “access denied”. I have enabled candidate datastore and netconf/capabilities/candidate. While the copy-config from running to candidate, edit-config on candidate, and commit to running datastore success.

Please help to confirm how to perform copy-config from candidate to running.

My netconf operation is as below.

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
        <copy-config>
                <target>
                        <running/>
                </target>
                <source>
                        <candidate/>
                </source>
        </copy-config>
</rpc>

]]>]]><?xml version="1.0" encoding="UTF-8"?>

application
access-denied
error

]]>]]>

If you want to copy from candidate to running the :writable-running capability must be set and /confdConfig/running/access must be read-write

Why not just commit the candidate?

I have already set running datastore as read-write as below. But still cannot copy-config from candidate to running.

read-write

commit success. Want to confirm if it’s restricted that only commit can be used to write candidate configuration to running, the copy-config from candidate to running is not supported?

RFC 6241 does not restrict copy-config target/source.
Quoting from RFC 6241:
"
7.3.
Description: Create or replace an entire configuration datastore
with the contents of another complete configuration datastore. If
the target datastore exists, it is overwritten. Otherwise, a new
one is created, if allowed."

You can copy the candidate to running using with confd.conf set as @jjohansson describes. But as @nabil writes, the standard way is to commit the candidate to running.

    <rpc message-id="101"
          xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
       <copy-config>
         <target>
           <running/>
         </target>
         <source>
           <candidate/>
         </source>
       </copy-config>
     </rpc>