Directory & File comands don't work for Linux

Apr 28, 2011 at 7:23 PM

I am connecting to a Debian/Linux server.  The System method brings back UNIX type: L8.  When I execute any of the commands that try to read the directory or files it is not recognizing system type as  dos or UNIX.  The GetRawListing method  returns data in this form:  "modify=20101220222335;perm=flcdmpe;type=dir;unique=5FUB47DC34B;UNIX.group=15000;UNIX.mode=0755;UNIX.owner=472037;public_html"  .  The DirectoryExists method returns false from the Parse method.  Again the string it is trying to parse is in the form:  "modify=20110419181942;perm=flcdmpe;type=dir;unique=2EUB47DC343;UNIX.group=15000;UNIX.mode=0755;UNIX.owner=472037; PGMbackup"

Any recommendations on how to parse this to get the directory or file results?  Is this something you want to include in your FTP routine?

Coordinator
Apr 28, 2011 at 7:45 PM

What FTP server software are you running exactly and what version of debian are you running? The listing you have is from the MLS* commands which are supported and preferred. They're neither DOS nor UNIX style, it's a format defined by RFC 3659. The RFC says there should be space between the file/dir name (Section 7.1) which I don't see in the first example with public_html however I suspect it is a typo because the second listing has the space. Anyhow, if you let me know what server software you're using I'll set it up (I have several debian dev systems) and I'll figure out what's going on. I was just about to commit several bug fixes and reliability enhancements, I'll hold off until I get this worked out.

Coordinator
Apr 28, 2011 at 8:00 PM
Edited Apr 28, 2011 at 8:01 PM

I just tested parsing the 2nd listing and there doesn't seem to be a problem. Here's the output:

 

Directory
PGMbackup
4/19/2011 6:19:42 PM
-1

And here's the code:

FtpListItem li = new FtpListItem();

if (li.Parse(
	"modify=20110419181942;perm=flcdmpe;type=dir;" +
	"unique=2EUB47DC343;UNIX.group=15000;" +
	"UNIX.mode=0755;UNIX.owner=472037; PGMbackup", 
	FtpListType.MLSD)) {
		Console.WriteLine(li.Type);
		Console.WriteLine(li.Name);
		Console.WriteLine(li.Modify);
		Console.WriteLine(li.Size);
}
else {
		Console.WriteLine("Parse failed.");
}

 

Coordinator
Apr 28, 2011 at 8:11 PM

OK, found and fixed a bug with the GetObjectInfo() method which is used by DirectoryExists(). See if that clears up the problem, revision 2605.

Apr 28, 2011 at 11:05 PM
The FTP software is Revision 2179 released on April 13, 2011, I downloaded it on April 14th. As for the version debian running I am not sure. The servers are run by ipower and their support would not give out that information for security reasons. I have requested a escalation to try and get the information but at this time it is unavailable. If there is any additional Information you need let me know. You are probably correct on the typo for the missing space.

On Thu, Apr 28, 2011 at 1:45 PM, jptrosclair <notifications@codeplex.com> wrote:

From: jptrosclair

What FTP server software are you running exactly and what version of debian are you running? The listing you have is from the MLS* commands which are supported and preferred. They're neither DOS nor UNIX style, it's a format defined by RFC 3659. The RFC says there should be space between the file/dir name (Section 7.1) which I don't see in the first example with public_html however I suspect it is a typo because the second listing has the space. Anyhow, if you let me know what server software you're using I'll set it up (I have several debian dev systems) and I'll figure out what's going on. I was just about to commit several bug fixes and reliability enhancements, I'll hold off until I get this worked out.

Read the full discussion online.

To add a post to this discussion, reply to this email (netftp@discussions.codeplex.com)

To start a new discussion for this project, email netftp@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Bev and John Milton
Coordinator
Apr 28, 2011 at 11:08 PM

Please try the latest code available under Sources and see if that clears up the problem. I have access to a friend's iPower account that I can run some tests on in the mean time.

Apr 28, 2011 at 11:10 PM
The FTP software is Revision 2179 released on April 13, 2011, I downloaded it on April 14th. As for the version debian running I am not sure. The servers are run by ipower and their support would not give out that information for security reasons. I have requested a escalation to try and get the information but at this time it is unavailable. If there is any additional Information you need let me know. You are probably correct on the typo for the missing space.

--
Bev and John Milton
Coordinator
Apr 28, 2011 at 11:15 PM

I just tested against iPowerWeb's ftp server and the latest version seems to parse the file listings fine. Versions prior to 2605 mistakenly try to parse LIST output when the MLS* commands were really being used for the GetObjectInfo() method of FtpClient, which I believe would have caused the problem you were seeing.

Apr 29, 2011 at 12:27 AM
The fix worked. Thanks for the quick response.

--

Apr 29, 2011 at 1:11 AM
I have tested the new version 2605 and it seems to work OK. Thanks for the quick fix.

On Thu, Apr 28, 2011 at 5:15 PM, jptrosclair <notifications@codeplex.com> wrote:

From: jptrosclair

I just tested against iPowerWeb's ftp server and the latest version seems to parse the file listings fine. Versions prior to 2605 mistakenly try to parse LIST output when the MLS* commands were really being used for the GetObjectInfo() method of FtpClient, which I believe would have caused the problem you were seeing.

Read the full discussion online.

To add a post to this discussion, reply to this email (netftp@discussions.codeplex.com)

To start a new discussion for this project, email netftp@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Bev and John Milton