This project is read-only.

Using FTPS in a SQL job

Jun 16, 2010 at 3:28 PM

I've written a program that uses this library to connect to an FTPS site and has both a CLI and GUI.  It reads a settings file to get the URL, user and pass.  The app runs fine (and can connect to the given FTPS site) from both interfaces. However, when I created a SQL job to run the app without the GUI, the application runs, but fails with a "User cannot log in" even though the settings file hasn't changed.


My first inclination is that this is somehow permissions based, but the app does actually run and can even create the log file to inform me of the error, so I'm a little confused as to what the actual problem is.  Has anybody ever seen anything like this?

Jun 16, 2010 at 6:12 PM

OK, I figured out the problem.  It was permissions based, but not based on any SQL permissions.  I was encrypting the FTP site password to be stored in a file with a "current user" security scope, so the SQL agent user couldn't decrypt it. Once I changed the scope to "local machine" it worked fine.

Jun 16, 2010 at 6:20 PM
Great to hear that everything worked out! Cheers, Alessandro Pilotti [MVP / IIS]