Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Created Unassigned: SftpPermissionDeniedException: %RNTO-bad% [2789]

$
0
0
Hi,
I am utilizing SSH.NET library for SFTP file processing and even though user has permission to rename file (move), I get below exception.

```
%RNTO-bad%
(DelegateServiceHandle.Start => <>c__DisplayClass7`1.b__6 => Program.b__3)
Renci.SshNet.Common.SftpPermissionDeniedException: %RNTO-bad% at Renci.SshNet.Sftp.SftpSession.RequestRename(String oldPath, String newPath) at Renci.SshNet.SftpClient.RenameFile(String oldPath, String newPath, Boolean isPosix) at
```

I have tested moving file from one directory to another using SFTP Clients like filezilla and WinScp with same user credentials. There it is working fine.

Below is the code I am using:

```
client.ListDirectory([SFTPDirectory])
.ToList()
.ForEach(file =>
client.RenameFile(Path.Combine([SourceDirectory], file.Name),
Path.Combine([DestinationDirectory], file.Name))
);
```

Could you please explain me why this happens ?

Thanks

Viewing all articles
Browse latest Browse all 1026

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>