Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

Problem Scenario

User configured a Job job to execute a simple Windows command to copy a file from folderA to folderB. Source The source directory is an a local directory but the target directory is an a shared drive/Samba mount on a Windows server. User The user reported that when he try tries to execute the same command from the CMD prompt he has no problem, but the same command when configured to run from JobScheduler throws an "Access denied" error.

JobScheduler example Job

Code Block
languagehtml/xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<job >
    <script  language="shell">
        <![CDATA[
           copy c:/outbound/test.txt d:\reports\daily
        ]]>
    </script>

    <run_time />
</job>

JobScheduler runs as a Service on a Windows Server, . The Windows Service has is assigned a special Service service User which may or may not have the same right permissions as the user logedinwho loged in/installed the JobScheduler or even administrator user.

To see what user right permissions JobScheduler is running with , user can you could execute the command whoami /all on the CMD prompt and also insert add the same command to JobScheduler in JobScheduler Joba job.
One can compare User Rights given to Starting from this you could compare the user permissions assigned to the Windows Service user and Admin to the user from the CMD prompt and from the JobScheduler job 's log.

JobScheduler example Job with whoami /all command

Code Block
languagehtml/xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<job >
    <script  language="shell">
        <![CDATA[
         whoami /all
         copy c:/outbound/test.txt d:\reports\daily
        ]]>
    </script>

    <run_time />
</job>