Topic "[SOLVED] - Error message: No file matching '*' found. (System Error. Code: 5. Access is denied)"

Author Message
Muffinz
[View user's profile]

Joined: 2016-12-15
Posts: 7
Location: Sweden
Hi,

I get an error message when I try upload som files on a FTP-server using the .Net Library.
It works when I run it in Powershell ISE (both x64 & X86) with both accounts (my own and the system account).
But when I run it in System Center Orchestrator 2012 R2 I get an error message from the WinSCP FTP Log:
Code:
. 2016-12-30 11:54:09.258 Startup conversation with host finished.
< 2016-12-30 11:54:09.258 Script: Active session: [1] UserName@HostName.com
> 2016-12-30 11:54:09.524 Script: pwd
< 2016-12-30 11:54:09.524 Script: /
> 2016-12-30 11:54:09.587 Script: put  -nopermissions -preservetime -transfer="binary" -- "\\Local\UNC\Path\*" "/RemotePath/"
< 2016-12-30 11:54:09.587 Script: No file matching '*' found. (System Error.  Code: 5.
< 2016-12-30 11:54:09.587 Access is denied)
. 2016-12-30 11:54:09.587 Copying 0 files/directories to remote directory "/RemotePath/"
. 2016-12-30 11:54:09.587   PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask:
. 2016-12-30 11:54:09.587   TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: ; ResumeL: 0
. 2016-12-30 11:54:09.587   AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
> 2016-12-30 11:54:09.649 Script: exit
. 2016-12-30 11:54:09.649 Script: Exit code: 0
. 2016-12-30 11:54:09.649 Closing connection.
. 2016-12-30 11:54:09.649 Sending special code: 12
. 2016-12-30 11:54:09.649 Sent EOF message


Any idés?

Update 1
I get the error message when I run:
Code:
$hostname = 'HotName'
$cred = Import-Clixml -Path "\\Local\UNC\Path\UserCred.xml"
$sb = {
       
        Set-Location "\\Local\UNC\Path\"
        powershell.exe "\\Local\UNC\Path\Script.ps1"
       
      }
#########################

Invoke-Command -ComputerName $hostname -Credential $cred -ScriptBlock $sb



Solution
I had to configure WSManCredSSP (Enable-WSManCredSSP) on both servers since it's a double-hop.
Source: https://blogs.msdn.microsoft.com/clustering/2009/06/25/powershell-remoting-and-the-double-hop-problem/
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License