FTP Upload Permission Denied

Hi all, I am currently trying to use the upload activity with the Create properties ticked so that bot can create folders dynamically based on dates. However, when the bot needs to create a folder, it is unable to do so with the error being Permission Denied. But when I tried to manually create the folder with the same credentials, I am able to do so.

Can you share the screenshot of the ftp activity properties?

The issue might be due to the SFTP and FTP selection, also are you using certificate while connecting through UiPath?

Hi @rahulsharma , these are the current properties for security:
image

And also am not connected to the SFTP during the process execution.

if you aren’t using SFTP connection then why the SFTP checkbox is checked in properties? Maye be try without it, if the connection is not required to be a SFTP

Make sure the path you provide is correct to the activity. That should work.

When I untick the SFTP option, now I am stuck at the with FTP session.

that means it’s a SFTP connection only. :slight_smile:

Ok, if that connection requires any certificate validation then tick that Accept all certificates

And try downloading once, just to see if any other action is getting performed.

Also check and let us know the version of FTP activity you are using

Firstly, make sure you use the latest one, and if that all doesn’t work, downgrading the version one by one, just to check if for any version it works . Sometimes newer version on marketplace has some bugs too.

Have tried the different versions but still same error. I am able to download/upload, only fails when I try to create new folder

It’s tough to troubleshoot like this, Can you check event logs in windows to see if we get anything there? Any warning or error with more detail.

If you are able to do the same manually in the same environment and using same credentials, then at server side, if possible get the details of this rejected action. As it showed, Permission Denied, just check the parameters it has while sending the request.

For now can provide this error:
RemoteException wrapping System.AggregateException: One or more errors occurred. —> RemoteException wrapping Renci.SshNet.Common.SftpPermissionDeniedException: Permission denied
at Renci.SshNet.Sftp.SftpSession.RequestMkDir(String path)
at Renci.SshNet.SftpClient.CreateDirectory(String path)
at UiPath.FTP.SftpSession.<>c__DisplayClass16_0.<UiPath.FTP.IFtpSession.CreateDirectoryAsync>b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.FTP.SftpSession.d__16.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.FTP.Activities.UploadFiles.d__20.MoveNext()
— End of inner exception stack trace —
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at UiPath.Shared.Activities.ContinuableAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context,
IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)

Because this is the clients server, will need to revert back at a later date.