FTP/SFTP: Upload Files - Creating a new folder does not work when using SFTP

Hi Together,

I am using “Upload Files” within a FTP Session and I have enabled the checkmark “create”.

When uploading the file on the FTP server, the folder is created.
When uploading the file on the SFTP server, the folder is not created.
Error message: Missing permissions.

Yet, I have all the permissions since I can create a folder manually using the same log-In.
And I also can upload a file to the SFTP server if I choose not to create a new folder.

Any Ideas? Workarounds?
Thank you!

I have read as well as other posts:
FTP Create Directory Activity - Help / Studio - UiPath Community Forum

Hi @PeCour

Would you mind testing this package below on a copy of your project? (just to be safe)
UiPath.FTP.Activities.2.4.0-beta.6897184.nupkg (1.1 MB)

It is going to be released soon, and at least I failed to reproduce your issue with it so far.

This is just to speed up an answer, because this new version fixes something for an SFTP server I had on hand that did not work with FTP 2.3.0. So I know that I was not able to reproduce your issue with this beta version, but I don’t know if this is because it also fixes your bug.

1 Like

Hi @loginerror,

thank you. I will test it. But how do I add a new package to the project?
Do you have a documentation for that?

For a quick test, you can add a local feed in the Package Manager → Settings like so:

You can point it to any folder on your hard drive, and then drop that beta package in that folder. Studio should pick it up immediately (at most you might have to close and reopen the package manager).

Please see here for a more detailed guide:

1 Like

Hi @loginerror,
I have tested it. But it does not work and results in the same behavior.
I can abload a file but I can’t create the new subfolder using SFTP.

Could you please share a sample dummy project (mocked up server url and credentials are fine). Or at least some exhaustive screenshots of your configuration.

It would help investigate the issue.

1 Like

Here is the project file:
SFTP_TEST.zip (163.9 KB)

Existing_folder: Exist on SFTP-Server (works SFTP and FTP)
New_Folder: Folder that I want to create on SFTP-Server (fail for SFTP, works for FTP)
Testfile: File I have to upload on SFTP-Server (works SFTP and FTP)

image

Does it help if you do

"/Existing_folder/New_Folder/Testfile.xlsx"

instead of

"Existing_folder/New_Folder/Testfile.xlsx"

?

@loginerror unfortunately that makes no difference.

Hi @PeCour , please try these to establish your SFTP process is working correctly.

image

Crete a free test SFTP server which lasts for 1 hour: Free SFTP server: online SFTP server for testing - SFTPCloud

image

image

@sudster thank you for your suggestion. But my SFTP-process is working correctly.
I can upload a file to the SFTP server.

e.g., if I leave out the New_Folder
image

Try and upload the folder, not the file; please follow my screenshots.

@sudster I tried it and it does not work.

And I tried to connect to the trial server as well. But it failed to establish a connection. And I have inputted "Host, Username, Password and port from the website.

@sudster and @loginerror can both of you not replicate the error? :see_no_evil:

For me, the SFTP works as intended. May be, please post your xaml so I can test for you.

@sudster hm strange. In that case I will ask my IT department again and if it does not work I will open an UiPath Support Ticket. Thanks anyway.

I already shared my .xaml above.

I’m sorry; I must’ve missed it.

Checked your xaml; there’s nothing unusual there. I’m guessing all variables in the xaml have proper values?

1 Like

Indeed, I can’t get it to reproduce on my end. I did some digging and it looks like it might be about the execute permission of the directories, but the logic fails a bit when the below is considered:

Either way - please give the sample SFTP server a test. I had the same error, but this was due to me forgetting the Use SFTP toggle on the FTP Scope activity:

Not working:

Working:

This should normally be it, unless there are some restrictions in your environment.

1 Like

@loginerror / @sudster: Ok thank you both for your updates and your help.

Yes, usually all of these are variables and I also used “SFTP”.

I will have a look at it with the IT department and the test server that you proposed.
I then also think that it is due to permissions.

For testing, hardcode values directly rather than using variables.

1 Like