7 Replies Latest reply on Jan 20, 2018 8:23 AM by Al Gallegos

    Simple copy Question

    Al Gallegos

      Hello all,

       

      I want to setup a simple copy between two Windows servers using a "Command" like Robocopy to transfer files between two servers.  My question is what user does the command Run As when it is executed as a "Command" job?  So the command would be like this

       

      robocopy c:\temp \\server\control-m

       

      What permissions would I have to give the share on \\server to make this work?  What user is this copy running as?

       

      thanks

        • 1. Re: Simple copy Question
          Paul Robins

          If the Windows server running the robocopy is configured to 'Logon As...' a user, that is the permissions it will use.

          Otherwise Control-M can be configured to use the 'Run As' user, but I don't have the info in front of me for configuring that :-)

          Someone else here will know!

          • 2. Re: Simple copy Question
            Al Gallegos

            Thanks Paul.  I think that you can create user/creds in the "RunAs" option in the Configuration Manager under Security which can be used in the "RunAs" option in the Workload job.  I'm testing this now. 

            • 3. Re: Simple copy Question
              Ranjith P K

              As Paul mentioned before, by default it will be use the account under which the agent is configured. But if you have credentials defined in CCM and the agent "log on as user" mode to "Y" ( from Properties -> Security), jobs can be submitted with that account.

              • 4. Re: Simple copy Question
                Al Gallegos

                I've set the "Logon As" user and domain at the agent using the ctmwincfg (might have spelled that wrong) command and also set the correct domain.  I've verified the user that was set in the CM can send files from the source server to the destination but still getting "Access denied". 

                 

                Robocopy "E:\Data"  \\servername\temp\

                 

                 

                -------------------------------------------------------------------------------

                   ROBOCOPY     ::     Robust File Copy for Windows                             

                -------------------------------------------------------------------------------

                 

                 

                  Started : Thursday, January 18, 2018 11:53:00 PM

                2018/01/18 23:53:00 ERROR 5 (0x00000005) Getting File System Type of Destination \\servername\temp\

                Access is denied.

                 

                 

                   Source : E:\Data

                     Dest - \\servername\temp\

                 

                 

                    Files : *.*

                   

                  Options : *.* /DCOPY:DA /COPY:DAT /R:1000000 /W:30

                 

                 

                ------------------------------------------------------------------------------

                 

                 

                2018/01/18 23:53:00 ERROR 5 (0x00000005) Creating Destination Directory \\servername\temp\

                Access is denied.

                • 5. Re: Simple copy Question
                  Ranjith P K

                  Please ensure that "temp" directory on the destination host has write permission for the account used.

                  • 6. Re: Simple copy Question
                    Al Gallegos

                    The credentials I’ve defined are domain admin and work from the command line.  It almost seems like it’s not using the credentials I’ve defined in the CM “Logon As”.  I’ve also tried creating a network drive using “net use” still no luck.

                     

                    I’am referencing this KB:  https://bmcsites.force.com/casemgmt/sc_KnowledgeArticle?sfdcid=kA214000000P8qiCAC&type=Solution

                    • 7. Re: Simple copy Question
                      Al Gallegos

                      Thanks for all your help.  I made a lot of changes and frankly it's hard to say which one made it work but here is a list of things I did:

                       

                      Ran the ctmwincfg from the source agent and changed the "Logon As" option to "Y"

                      I defined a user in the configuration manager in "security", "RunAs". (I believe this is case sensitive if your CM server is Linux)  Also specify the domain if you are in a multi domain env.  ie: domain\username

                      Created a network share on the target and give it the correct permissions