Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting

Thread Tools Rate Thread Display Modes
Old 04-18-2005, 07:59 PM
vkbeaudreau's Avatar
vkbeaudreau vkbeaudreau is offline
Registered User
Join Date: Mar 2005
Posts: 3
Noob Question

Product in Question: Version 2.3.3 (build 217)

I am trying to write a file upload trigger that checks for a certain user id and, upon success, transfers that user's file to another secure ftp server. Actually I want it to activate on a file upload to a particular folder, but I thought this would be easier.

My batch file is very simple right now as I havent started checking for the username yet - im still trying to get the file transfer part working.

The command I have in my batch file is:
e:\pscp.exe -i e:\identity.ppk -pw password %1 user@server:
the batch file is called thus in the trigger command:
e:\sftp.bat %P

This works when I run it from the command line, but doesn't seem to work when used as a trigger. I don't see anything amiss in the VShell Log files or the Windows event log.

Any thoughts?

Pancakes taste good, but their wily ways are not to be trusted.
Reply With Quote
Old 04-18-2005, 11:42 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,096
VShell trigger scripts run as the same user that the VShell service is running as, which is, by default SYSTEM.

This means that any number of things could go wrong when VShell runs the process (that don't go wrong when you run it interactively):

I noticed that you are supplying information for both public-key and password authentication. If the private key is protected with a passphrase, could it be that 'pscp' is hanging on a prompt asking for the passphrase?

Since 'pscp' is running as SYSTEM, it's possible that it's getting stuck in the host key verification phase through which all "first-time" secure shell connections to a specific host must pass.

Are you able to get any debug output from 'pscp' to verify if it is hanging on the hostkey verification phase?

Have you attempted to add any debug output to a log file from within the .bat file to see what might be going wrong?

For example:
@echo off
echo. Command: "e:\pscp.exe -i e:\identity.ppk -pw password %1 user@server:"
e:\pscp.exe -i e:\identity.ppk -pw password %1 user@server:
echo. Result: %ERRORLEVEL%
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
Old 04-19-2005, 09:00 AM
vkbeaudreau's Avatar
vkbeaudreau vkbeaudreau is offline
Registered User
Join Date: Mar 2005
Posts: 3
Thanks very much Jake. The problem was indeed the service account under which VShell was running (System). I set it to run under another account that has rights to run batch jobs and everything works great.
Pancakes taste good, but their wily ways are not to be trusted.
Reply With Quote
Old 05-13-2013, 03:24 PM
bgagnon bgagnon is offline
VanDyke Technical Support
Join Date: Oct 2008
Posts: 4,634
Hi all,

There was an old thread (since deleted) where a user requested the ability to configure triggers on a "per user" basis.

This thread seemed very similar so I decided to post an update here.

The functionality of being able to configure triggers on a per user basis is now available in a pre-release version of VShell (Windows only).

This version of VShell also includes a complete revamp of triggers in VShell for Windows, including multiple actions per trigger, built-in email support and the ability to fire triggers for specific users/groups.

If anyone is interested in trying the new trigger functionality in VShell please send an email to support@vandyke.com and include "Feature Request - Forum Thread #702" in the subject line.

Please specify the specific version of VShell installer you would need:
  • 32-bit or 64-bit
  • SFTP only or SFTP + FTP/SSL version of VShell
Please contact us from (or include information on) the email address associated with your VanDyke Software download account.

VanDyke Software
Technical Support
(505) 332-5730
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 01:39 AM.