Hi

I am trying to connect with sftp when I get this errormessage:

Rebex.Net.SftpException: Permission denied; syserr: Operation not permitted, file: . at wWGvS.APnbEo.sxMvMZ(BBdsJfZ , Type ) at wWGvS.APnbEo.Nbjil(String , AsNqWa , Boolean ) at Rebex.Net.Sftp.cqcMbi(AsNqWa , Object , String , Stream , Int64 , Int64 ) at Rebex.Net.Sftp.PutFile(Stream sourceStream, String remotePath)

The code:

Sftp sftp = new Sftp();
sftp.Connect(Hostname, Port);
sftp.Login(UserName, Password);

invoiceStream.Position = 0;
sftp.PutFile(invoiceStream, "/incoming/" + fileName);

It fails when I try to put the file.

I have used rebex to connect to several ftp servers before. This is the first time I see this, rather abstract, error message.

When I try to connect with a 3rd party client I have to accept an "unknown fingerprint".

Do you have any idea what might cause this?

asked 24 Feb '11, 12:27

Jonas%20Gulsrud's gravatar image

Jonas Gulsrud
16
accept rate: 0%

This exception represents an error that was reported by the SFTP server. "Permission denied" is a status code and "syserr: Operation not permitted, file: " is the error message (both sent by the server). You are right that this is rather abstract - please create a log of communication using Sftp object's LogWriter property (see rebex.net/kb/logging.aspx for details) and either add it to your question or mail it to support@rebex.net - that should make it possible to see what is going on and hopefully be able to tell what to do about it.

(24 Feb '11, 13:20) Lukas Pokorny ♦♦
1

Investigating the log revealed an issue with the path used to upload the file. It seems that the server would not accept a leading "/" in the path. Removing it solved the issue. Thank you.

(28 Feb '11, 12:40) Jonas Gulsrud

Check out the comment section of the question for an answer.

link

answered 25 Mar '11, 09:04

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.4k28
accept rate: 31%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×144
×23
×15
×3

Asked: 24 Feb '11, 12:27

Seen: 847 times

Last updated: 25 Mar '11, 09:04