cedrozor / myrtille

A native HTML4 / HTML5 Remote Desktop Protocol and SSH client
https://www.myrtille.io
Apache License 2.0
1.78k stars 372 forks source link

File Transfer - Failed to retrieve files in TEMP\Documents #380

Open Hesketh opened 9 months ago

Hesketh commented 9 months ago

So we have Myrtille setup on our machine and to the best of our knowledge it should be configured correctly for file transfer but it fails with exceptions that are happening in Myrtille.Services.log when we try and upload a file (also no files are listed for download).

2023-11-16 11:25:30,552 [46] ERROR System.Diagnostics redirection [(null)] - Failed to retrieve file(s) from user MYRTILLE001 documents folder C:\Users\TEMP\Documents, remote session 45ff33de-4a60-42c5-83dd-8bd9496a609c (System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\TEMP\Documents'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.GetFiles(String path)
   at Myrtille.Services.FileStorage.GetUserDocumentsFolderFiles(Guid remoteSessionId, String userDomain, String userName, String userPassword))
2023-11-16 11:25:36,162 [46] ERROR System.Diagnostics redirection [(null)] - Failed to retrieve file(s) from user MYRTILLE001 documents folder C:\Users\TEMP\Documents, remote session 45ff33de-4a60-42c5-83dd-8bd9496a609c (System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\TEMP\Documents'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.GetFiles(String path)
   at Myrtille.Services.FileStorage.GetUserDocumentsFolderFiles(Guid remoteSessionId, String userDomain, String userName, String userPassword))
2023-11-16 11:25:38,399 [46] ERROR System.Diagnostics redirection [(null)] - Failed to upload file asda.csv to user MYRTILLE001 documents folder C:\Users\TEMP\Documents, remote session 45ff33de-4a60-42c5-83dd-8bd9496a609c (System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\TEMP\Documents\asda.csv'.
   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)
   at Myrtille.Services.FileStorage.UploadFileToUserDocumentsFolder(UploadRequest uploadRequest))

The User we are using for the remote session is MYRTILLE001. And I am uploading a document called asda.csv from my local machine desktop.

We have done the redirect of the documents for this user to a network share. And if I remote in using Window's Remote Desktop the folder is redirected and files stored there can be read/written/deleted/etc. However if I remote in (and launch an app) using Myrtille the folder is empty. Strangely If I write a file into the documents it will write into the network share, but the active Myrtille user wont see it while connected through Myrtille.

Now we are thinking its likely because its trying to look in 'C:\Users\TEMP\Documents\' instead of the actual Documents for the user.

I appreciate any info you could provide, I respect this could just be a configuration issue but we are at a loss for what we are doing differently.