SFTP Download - Access to path is denied

Dec 13, 2013 at 7:54 PM
Creating a new SSIS (designed in SSDT VS2010) package and trying to perform a SFTP Receive file(s) task. This is on a local Windows 7 computer and want to download to a local folder on the C drive. I have been able to have SSIS create files (as flat file destination from a data flow) to the same folder. But for the SFTP Task it create following error:
[Execute: ] Error: Error: Unable to Download: Access to the path 'c:\temp' is denied.
StackTrace:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at SSIS.Extensions.SFTP.SFTPConnection.DownloadFiles(List`1 fileList)

   at SSIS.Extensions.SFTP.SFTPConnection.ThrowException(String Message, Exception ex)
   at SSIS.Extensions.SFTP.SFTPConnection.DownloadFiles(List`1 fileList)
   at SSIS.Extensions.SFTPTask.SFTPTask.Execute(Connections connections, VariableDispenser variableDispenser, IDTSComponentEvents componentEvents, IDTSLogging log, Object transaction)
The folder has the correct permissions and VS2010 is running as administrator.
Looking at the execution process (with SFTP Logging as verbose) it connects without errors and getting a file list

Anyone experienced this and any possible solution? In the end we will need it to download files to a shared storage location on our production SQL Server.
Dec 13, 2013 at 8:16 PM
Edited Dec 13, 2013 at 8:21 PM
Believe I have found the issue. Seems like the "Remote Filter" didn't evaluate as expected. And the first file in the file list is a period (current folder) which of course cannot be opened by IO for write.

Remote filter:
Name.StartsWith("mrc") and Name.EndsWith(".gpg")
Dec 13, 2013 at 10:03 PM
Figured out that setting the "Remote Filter" as a string value doesn't work. Has to be set either as a variable reference or parameter. All is good.
Marked as answer by TypoDane on 12/13/2013 at 2:03 PM