Acces is Denied when trying to move a file with a bat

All questions about Control-M jobs definitions
Post Reply
User avatar
HowardLyle
Nouveau
Nouveau
Posts: 26
Joined: 05 Aug 2008 12:00

Acces is Denied when trying to move a file with a bat

Post by HowardLyle » 19 Aug 2010 4:22

I have a bat file that just moves a file from a directory to a file share:

move C:\Hyperion\Exports\MDM_CPT_HFM.TXT \\21.111.67.101\shareddata\Hyperion\MDM\MDM_CPT_HFM_081820102111.txt

The destination location is secure and only certain users have access.

When I log onto the source server as a user that has access to the destination folder and execute the command line above the file moves successfully.

When I create a Ctrl-M task type JOB and put in the file name and path name and set the Owner as the user with access and the nodeid is the source server I get the following error in the sysout and the file does not move:

Access is denied.

Any suggestions?

User avatar
satavpa
Nouveau
Nouveau
Posts: 13
Joined: 19 Nov 2009 12:00

Post by satavpa » 20 Aug 2010 5:34

Hi,

Use the job type as Command; Keep our path in cmdline.

baralem

Post by baralem » 25 Aug 2010 3:19

If it's posible, try running control-m agent services with the user that has access to the destination path.
Jobs on windows runs as "LOCAL SYSTEM" unless you set up "Logon as user":

Logon as user:
Flag that specifies which user account is used for the services to log
on to.
Selected – Jobs are submitted with the permissions and
environment variables of the specified user.
Not selected – Jobs are submitted with the permissions and
environment variables of the local system account. Default.

Check Control-m Agent Admin Guide for more info.
regards

martin

User avatar
catchtony
Nouveau
Nouveau
Posts: 50
Joined: 12 Sep 2008 12:00
Contact:

Post by catchtony » 30 Nov 2011 11:44

Is the solution for this has been obtained ? I am facing the same issue. Please share.

User avatar
rich_arredondo
Nouveau
Nouveau
Posts: 16
Joined: 04 Nov 2011 12:00

Account with permissions

Post by rich_arredondo » 30 Nov 2011 6:28

Two possible solutions:

- Use an account with folder permissions to log in the Control-M Agent Service.

- Use the variable %%PRECMD with a net use command specifying the path and the login user you use to write on the folder with the proper permissions.

User avatar
catchtony
Nouveau
Nouveau
Posts: 50
Joined: 12 Sep 2008 12:00
Contact:

Post by catchtony » 05 Dec 2011 4:52

I also faced the same situation, the solution was set the agent services to Domain account instead of Local user

User avatar
rchkevin
Nouveau
Nouveau
Posts: 67
Joined: 29 Oct 2007 12:00
Location: Chennai

Post by rchkevin » 09 Feb 2012 5:15

If agent is running as local system, then provide read, write permissions to the directory or file to "SYSTEM" and " NETWORK SERVICES"

Post Reply