Versions Compared

Key

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

...

Problem Scenario

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

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 Service on Windows Server, Windows Service has a special user Service User which may or may not have same right as user logedin/installed the JobScheduler , or even administrator user.

To see what user right JobScheduler is running with , user can execute command whoami /all on CMD prompt and also insert same command in JobScheduler Job.
One can compare User Rights given to Windows Service user and Admin user from CMD prompt and JobScheduler job's log.

JobScheduler example Job with whoali /all command

...