Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
6.2k views
in .NET FTP by (200 points)
Hey guys,

I'm running into an issue with edtFTP in my application. I'm using the sftp component and it gives me an error when trying to create a directory.

When I use another client (coreftp), I'm able to connect and create directories to my heart's content. The sftp being used is freeFTPd. Any idea why this might work with another client, but not through my application using edtFTP?

Also, what do the attributes for each of these requests mean? I can guess that MD is modify datetime, and U is permissions, but is there a guide to telling me what the attributes mean? I couldn't find anything via Google, but perhaps I'm not using the right keywords.

Here is a snippet of the ftp log being generated:
ALL [SFTPMessage] 10 Jul 2008 09:34:14.447 : Reply : Name=SSH_FXP_NAME,Type=104,RequestID=2
[AP=/, O=False, US=, G=, D=False, F=False, LI=False, R=False, W=False, AT=0, AD=1/1/1970 12:00:00 AM, MT=0, MD=1/1/1970 12:00:00 AM, P=0, S=0, U=, LN= 1 0 Jan 01 1970 ]
DEBUG [EnterpriseDT.Net.Ftp.Ssh.SSHFTPClient] 10 Jul 2008 09:34:14.447 : ChDir(actual=/)
DEBUG [ab] 10 Jul 2008 09:34:14.447 : GetAttributes(/)
ALL [SFTPMessage] 10 Jul 2008 09:34:14.447 : Send : Name=SSH_FXP_STAT,Type=17,RequestID=3
path=/
DEBUG [PlainSocket] 10 Jul 2008 09:34:14.525 : RepeatCallback received 84 bytes
DEBUG [SFTPMessageFactory] 10 Jul 2008 09:34:14.525 : Received message (type=105)
DEBUG [e0] 10 Jul 2008 09:34:14.525 : AddMessage(3) - added to store
ALL [SFTPMessage] 10 Jul 2008 09:34:14.525 : Reply : Name=SSH_FXP_ATTRS,Type=105,RequestID=3
attributes=US=0, G=0, D=True, F=False, LI=False, R=True, W=True, AT=-14401, AD=12/31/1969 7:59:59 PM, MT=-14401, MD=12/31/1969 7:59:59 PM, P=16895, S=8, U=drwxrwxrwx
DEBUG [ab] 10 Jul 2008 09:34:14.525 : GetAttributes(/Login_Page/Test_page/)
ALL [SFTPMessage] 10 Jul 2008 09:34:14.525 : Send : Name=SSH_FXP_STAT,Type=17,RequestID=4
path=/Login_Page/Test_page/
DEBUG [PlainSocket] 10 Jul 2008 09:34:14.587 : RepeatCallback received 84 bytes
DEBUG [SFTPMessageFactory] 10 Jul 2008 09:34:14.587 : Received message (type=101)
DEBUG [e0] 10 Jul 2008 09:34:14.587 : AddMessage(4) - added to store
ALL [SFTPMessage] 10 Jul 2008 09:34:14.587 : Reply : Name=SSH_FXP_STATUS,Type=101,RequestID=4
errorCode=2
errorMessage=No such file
language=
DEBUG [ab] 10 Jul 2008 09:34:14.587 : No such file : /Login_Page/Test_page/
ALL [SFTPMessage] 10 Jul 2008 09:34:14.587 : Send : Name=SSH_FXP_MKDIR,Type=14,RequestID=5
path=/Login_Page/Test_page/
attributes=US=, G=, D=False, F=False, LI=False, R=False, W=False, AT=0, AD=1/1/1970 12:00:00 AM, MT=0, MD=1/1/1970 12:00:00 AM, P=0, S=0, U=
DEBUG [PlainSocket] 10 Jul 2008 09:34:14.650 : RepeatCallback received 84 bytes
DEBUG [SFTPMessageFactory] 10 Jul 2008 09:34:14.650 : Received message (type=101)
DEBUG [e0] 10 Jul 2008 09:34:14.650 : AddMessage(5) - added to store
ALL [SFTPMessage] 10 Jul 2008 09:34:14.650 : Reply : Name=SSH_FXP_STATUS,Type=101,RequestID=5
errorCode=3
errorMessage=Permission denied
language=
DEBUG [EnterpriseDT.Net.Ftp.ExFTPConnection+b] 10 Jul 2008 09:34:14.650 : Stopping FTP task processor.
DEBUG [EnterpriseDT.Net.Ftp.ExFTPConnection+b] 10 Jul 2008 09:34:14.650 : FTP task processor stopped.
DEBUG [EnterpriseDT.Net.Ftp.Ssh.SSHFTPClient] 10 Jul 2008 09:34:14.650 : Quit() called

6 Answers

0 votes
by (162k points)
The directory you are trying to create is /Login_Page/Test_page/

Is that correct? Are you sure you have permissions at this level to do so?

What is the full path of the directory you are creating with the other client? I would probably expect something more like /home/username/login_page

A snippet of code would also be useful to see.
0 votes
by (200 points)
sorry for the late response, I forgot I posted this up.

The path it's trying to create /Login_Page/Test_page/ is correct. There are definitely permissions on this level. If I log in with an FTP client (capable of SFTP) that's installed on the same server as this application, using the same username and password as what I've specified in my application, I am able to create a directory called Test_Page that's underneath the already existing Login_Page folder.

I'm not sure what the full path of the directory is as I do not own or run that server, but I do know that the Login_Page folder is an existing folder in my home directory.

I don't have access to the code, but I'll see if I can get it.
0 votes
by (162k points)
Try changing into /Login_Page and then creating the subdir?
0 votes
by (200 points)
yep, I've tried that. Logged into the SFTP server using CoreFTP, and then navigated to the /login_page directory and created a new directory called test_page underneath there, and it gives me no issues adding this in.
0 votes
by (162k points)
Can you please email us a full log file (from the beginning) of a test program that tries to create the dir? Also, if you are able to give us a test account that'll make it easy to figure out. support at enterprisedt dot com.

Please zip the log file before emailing.

It'd be handy if you can also send a log from CoreFTP.
0 votes
by (162k points)
Any luck with this?

Categories

...