Page 1 of 1

Event calling bat file - error 259

Posted: Thu Sep 28, 2017 5:59 am
by richard205
Hi,

I've been using Cerberus now for almost 4 years. But have come across a situation which I've been unable to solve as yet.

My scenario is this.

DMZ
This server is not domain joined. Cerberus was installed using the local administrator account and runs under the "Local System" account

Files are deposited from external source to server using SFTP.
On logoff, the event manager calls an event target e,g. (c:\events\testbooks.bat)
When the log off occurs, I see the following in the log pane.

Match for rule 'testbookmove' : Executing action External Process
Invoking process 'C:\events\testbooks.bat' with command line ''
Monitor for process 'C:\events\testbooks.bat' timed out
Process C:\events\testbooks.bat' executed with return code : 259 (failure)

If i run the testbooks.bat file from a command line manually this runs all of the commands within without issue.
The batch file essentially transfers a file(s) to an internal SFTP server (another Cerberus FTP server. At the same time it creates an archived copy elsewhere on the server in the DMZ

Any help on this would be much appreciated.

Many thanks
Richard

Re: Event calling bat file - error 259

Posted: Thu Sep 28, 2017 11:37 am
by pacman
Hello, Ricahard.

It could be a permission issue, does the Cerberus Service in windows have permission to execute the script?

Re: Event calling bat file - error 259

Posted: Fri Sep 29, 2017 6:05 am
by richard205
Hi Pacman,

it does seem like its permissions.

This morning, I've changed Cerberus to run from Local System (tried with and without desktop integration), to a user account with logon as a service and at admin level. This now runs and completes each of the elements within the batch file.

I forgot to mention in the batch file, there is a call to another product to SFTP to the internal facing Cerberus SFTP server. I think this is where the 259 message is coming from.
Having created separate event targets for each of the separate lines in the original batch file, running those sequentially in the event rule it ties in with that call of the third party product.

I do still get a 259 message in the log file. But for now, the service processes the files and for my own sanity its working.

Will update this thread once i get that error code sorted out.

many thanks
Richard