login about faq

Heey everyone.

I have a problem with my Code, that i cant move files from one directory/Folder to another. I have uploaded files there is laying in the /HOME/, and i need to move the same files from /Home/ to /Upload/ instead. I have tried the SFTP.RenamefileorDir. but it wont Work and i just get an Permission Declined. i have tried login the server just with an SFTP client. and i can easy move the files from there. But if i use my program in C# i get Permission declined, Anyone have an idea what this that be and maybe a advice on what i can do now :)

  • Mathias

asked Jan 27 '16 at 08:23

baskerwild's gravatar image


Your SFTP user account probably has access restricted to the directory tree starting in the HOME directory and below.

In general, it's virtually impossible for others to help with "permission denied" because the error it is caused by the file and directory ownership and permissions on the server, in combination with the permissions configured for the particular SSH user account (on your particular "brand" of SSH server -- whether it be OpenSSH or a commercial server, and the features for setting up and configuring user accounts are specific to the SSH server implementation and not part of any protocol).

So in general, only the systems administrator (which may be the developer himself), is privy to the information required to understand the cause of the problem..


answered Jan 27 '16 at 15:25

chilkat's gravatar image

chilkat ♦♦


Heey Again.

I found out of my problem. i had made a array to list the different file names to get uploaded, and then made a new array list to move the same files. But that ended but in a Permission denined. but if i just used the same array as i did to upload them. it all worked fine :) But thanks for the answar, and yeah if it was becasue i didnt have promission to move it made sense only the owner of the server could help me then. But since i could join with a SFTP client and move them there it couldnt be the problem.

(Jan 28 '16 at 03:21) baskerwild

However, if I understand what he says correctly, when he used another SFTP client, he was able to move the files, just not through his code using Chilkat library which appears to clear any issues with permissions.


answered Jan 27 '16 at 16:17

Hhpark's gravatar image


Yeah this was the case. I couldnt move them with my C# Code, but with a normal SFTP client i could easy login and move them without problem.

(Jan 28 '16 at 03:22) baskerwild

Thanks! I'm glad to hear the problem is solved. I should've mentioned previously (and I'm sorry I didn't) that it's good to examine the contents of the LastErrorText with VerboseLogging turned on. Usually the LastErrorText will emit the values of the method args it receives so that one can check to see if the actual values passed to a Chilkat method are the expected ones.


answered Jan 28 '16 at 08:07

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jan 27 '16 at 08:23

Seen: 2,698 times

Last updated: Jan 28 '16 at 08:07

powered by OSQA