Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Muffinz

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

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:
. 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:
$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: <invalid hyperlink removed by admin>