Testing JFTP - Your help needed...

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Testing JFTP - Your help needed...

Post by friesengeist » Mon Mar 05, 2007 7:54 pm

Hi Q&T Workgroup,

since quite a few of you now have access to the Unit Test repository, may I ask you for some help please?

Our aim is to test the FTP filesystem layer on as many system systems as possible. When that's done, some documentation about supported FTP servers should be created, together with the Documentation Workgroup.

So far, I have tested the FTP layer from three different clients against four different FTP servers. What I would like you to do is to test this FTP library from your installation against all servers you have access to.

If you have some time available, and are willing to help, here is what you need to do:
  • Create an empty folder "unittest" within your Joomla! SVN working copy.
  • Check out the stable tag from the unit test repository: http://joomlacode.org/svn/joomla/testin ... e/unittest into this new folder
  • Copy the file /unittest/tests/libraries/joomla/client/ftp.conf-dist to ftp.conf
  • Edit your settings in the file ftp.conf (make sure that directory is not readable from the web, as the file contains your FTP password)
  • Comment out line 27 from /unittest/UnitTestController.php:
    //include_once( str_replace( UNITTEST_BASE.DIRECTORY_SEPARATOR, '..'.DIRECTORY_SEPARATOR, $file ) );
  • Point your browser to /unittest/ (alternatively, you can of course run the test from the commmand line etc...)
  • Run the test libraries->joomla->client->ftp.php
  • Switch the setting for FTP_NATIVE (in ftp.conf), to test both modes, native mode and emulated mode:
    !defined('FTP_NATIVE') && define('FTP_NATIVE', false);
    Make sure the mode got actually changed, by looking at the second output of the test case.
Hopefully, you receive an output similiar to the one attached to this post.
If you get a completely passing test, please post your setup (Client PHP version, Client Operating System, Client native/emulated mode, Server OS, FTP Server software) to this thread. If some tests fail, please post the details of the failing test to this thread.

I'll start to collect the results in the second post of this thread. If you are ableto edit posts on this board, feel free to add passing test results directly into the second post!

For any questions, just ask ;)

Thanks a lot for your help :)


Edit: Fixed link to new Forge...
You do not have the required permissions to view the files attached to this post.
Last edited by friesengeist on Tue Apr 03, 2007 4:37 pm, edited 1 time in total.
We may not be able to control the wind, but we can always adjust our sails

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Testing JFTP - Your help needed...

Post by friesengeist » Mon Mar 05, 2007 7:56 pm

List of test results:




Client OS
Client Webserver
Client PHP Version
Server OS
FTP Server (version)
Native mode
Emulated mode
Verified by



Edgy Eft
Apache 2.0.55
5.1.6
Windows XP
FileZilla 0.9.23 beta
PASS
PASS
Ianmac



Debian Sarge
Apache 2.0.54
4.3.10
Windows XP
FileZilla 0.9.23 beta
PASS
PASS
friesengeist



Windows XP
Apache 2.0.53
4.4.4
Windows XP
FileZilla 0.9.23 beta
PASS
PASS
friesengeist



Windows XP
Apache 2.0.53
5.1.4
Windows XP
FileZilla 0.9.23 beta
PASS
PASS
friesengeist



Edgy Eft
Apache 2.0.55
5.1.6
Windows XP
Global Scape Secure FTP Server
FAIL
FAIL
Ianmac



Debian Sarge
Apache 2.0.54
4.3.10
Windows XP
IIS 6
PASS
PASS
friesengeist



Windows XP
Apache 2.0.53
4.4.4
Windows XP
IIS 6
PASS
PASS
friesengeist



Windows XP
Apache 2.0.53
5.1.4
Windows XP
IIS 6
PASS
PASS
friesengeist



Gentoo
Lighttpd
4.4.6
Gentoo (linux 2.6.*)
ProFTPD 1.3.1 RC2
FAIL
FAIL
lamad



Gentoo
Lighttpd
5.1.6
Gentoo (linux 2.6.*)
ProFTPD 1.3.1 RC2
PASS
PASS
lamad



Edgy Eft
Apache 2.0.55
5.1.6
FC5
ProFTPD 1.3.1 RC2
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
ProFTPD 1.3.0a
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
ProFTPD 1.3.0
PASS
PASS
Ianmac



FC4
?
?
FC4
ProFTPD 1.3.0
FAIL
PASS
The Ray



Debian Sarge
Apache 2.0.54
4.3.10
Linux (?)
ProFTPD 1.2.10
PASS
PASS
friesengeist



Windows XP
Apache 2.0.53
4.4.4
Linux (?)
ProFTPD 1.2.10
PASS
PASS
friesengeist



Windows XP
Apache 2.0.53
5.1.4
Linux (?)
ProFTPD 1.2.10
PASS
PASS
friesengeist



Edgy Eft
Apache 2.0.55
5.1.6
FC5
ProFTPD 1.2.10
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
ProFTPD 1.2.10RC3
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
ProFTPD 1.2.10RC1
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
ProFTPD 1.2.9
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
ProFTPD 1.2.8
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
ProFTPD 1.2.6
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
ProFTPD 1.2.5
PASS
PASS
Ianmac



?
?
?
Gentoo
Pure-FTPd 1.0.21
PASS
PASS
Schlu



Edgy Eft
Apache 2.0.55
5.1.6
Edgy
Pure-FTPd 1.0.21
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
Edgy
Pure-FTPd 1.0.20
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
Edgy
Pure-FTPd 1.0.19
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
Edgy
Pure-FTPd 1.0.18
PASS
PASS
Ianmac



Windows XP
Apache 2.0.53
4.4.4
Linux (?)
TwoFTPd (version unknown)
PASS
PASS
friesengeist



Windows XP
Apache 2.0.53
5.1.4
Linux (?)
TwoFTPd (version unknown)
PASS
PASS
friesengeist



Debian Sarge
Apache 2.0.54
4.3.10
Linux (?)
TwoFTPd (version unknown)
PASS
PASS
friesengeist



Edgy Eft
Apache 2.0.55
5.1.6
FC5
VSFTPD 2.0.5
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
VSFTPD 2.0.4
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
VSFTPD 2.0.3
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
Windows XP
Titan 5.37.387
FAIL
FAIL
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
VSFTPD 2.0.2
PASS
PASS
Ianmac



Gentoo
Lighttpd
4.4.6
REL 3
VSFTPD 2.0.1
FAIL
FAIL
lamad



Gentoo
Lighttpd
5.1.6
REL 3
VSFTPD 2.0.1
PASS
PASS
lamad



Edgy Eft
Apache 2.0.55
5.1.6
FC5
VSFTPD 2.0.1
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
VSFTPD 2.0.0
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
VSFTPD 1.2.2
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
VSFTPD 1.2.1
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
VSFTPD 1.2.0
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
VSFTPD 1.1.3
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
VSFTPD 1.1.2
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
VSFTPD 1.1.1
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
VSFTPD 1.1.0
PASS
PASS
Ianmac



Edgy Eft
Apache 2.0.55
5.1.6
FC5
WU_FTP 2.6.2(1)
PASS
PASS
Ianmac















As said above, feel free to edit this list, if you have the rights to do so...
Last edited by friesengeist on Mon May 07, 2007 12:39 pm, edited 1 time in total.
We may not be able to control the wind, but we can always adjust our sails

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Testing JFTP - Your help needed...

Post by friesengeist » Tue Apr 03, 2007 4:42 pm

Hey, come on guys, some of you have some free minutes to run a few tests, don't you?

Since the Q&T repository has been moved to the new forge, everyone should have access to it, so even if you have not had access to the unittest code before, you should be able to check it out now.

Also, if there are other community members who would like to help here, please feel free to contribute to this thread - post your results, or post your questions if you have any about this unittesting stuff...

Looking forward to reading your test results,
Enno :)
We may not be able to control the wind, but we can always adjust our sails

User avatar
Jonah
Joomla! Explorer
Joomla! Explorer
Posts: 299
Joined: Thu Aug 18, 2005 6:02 pm
Contact:

Re: Testing JFTP - Your help needed...

Post by Jonah » Tue Apr 03, 2007 6:17 pm

friesengeist wrote: Hey, come on guys, some of you have some free minutes to run a few tests, don't you?
I didn't before, but I do now, so thanks for the reminder.  :-)

Here's what I got after running the test right now:

Code: Select all

tests/libraries/joomla/client/ftp.php -> TestOfJFTP -> testCredentialsAvailable -> Testing host [****] on port [21] with user [****] and pass [****]. FTP Root Path set to [/home/tuesday]
tests/libraries/joomla/client/ftp.php -> TestOfJFTP -> testCredentialsAvailable -> FTP_NATIVE mode is switched ON
tests/libraries/joomla/client/ftp.php -> TestOfJFTP -> testCredentialsAvailable -> Should be no errors at line [35]
tests/libraries/joomla/client/ftp.php -> TestOfJFTP -> test__construct -> Value [Object: of JFTP] should be type [JFTP] at line [68]
tests/libraries/joomla/client/ftp.php -> TestOfJFTP -> test__construct -> Should be no errors at line [35]
I'm assuming this means it passed, is that correct?  If so, I will update your list with all the variations I can test with.

Feel free to post with anything else you need tested.
trinitywebhosting.com - Free Joomla! websites for churches and non-profits.

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Testing JFTP - Your help needed...

Post by friesengeist » Wed Apr 04, 2007 3:47 pm

Thanks for jumping in here, lamad :)
lamad wrote: Here's what I got after running the test right now:

Code: Select all

tests/libraries/joomla/client/ftp.php -> TestOfJFTP -> testCredentialsAvailable -> Testing host [****] on port [21] with user [****] and pass [****]. FTP Root Path set to [/home/tuesday]
tests/libraries/joomla/client/ftp.php -> TestOfJFTP -> testCredentialsAvailable -> FTP_NATIVE mode is switched ON
tests/libraries/joomla/client/ftp.php -> TestOfJFTP -> testCredentialsAvailable -> Should be no errors at line [35]
tests/libraries/joomla/client/ftp.php -> TestOfJFTP -> test__construct -> Value [Object: of JFTP] should be type [JFTP] at line [68]
tests/libraries/joomla/client/ftp.php -> TestOfJFTP -> test__construct -> Should be no errors at line [35]
I'm assuming this means it passed, is that correct?  If so, I will update your list with all the variations I can test with.
Is that all you get? There should be a whole lot more lines than that. I've attached a pic about what I get at the end of the output...
You do not have the required permissions to view the files attached to this post.
We may not be able to control the wind, but we can always adjust our sails

User avatar
Jonah
Joomla! Explorer
Joomla! Explorer
Posts: 299
Joined: Thu Aug 18, 2005 6:02 pm
Contact:

Re: Testing JFTP - Your help needed...

Post by Jonah » Wed Apr 04, 2007 6:08 pm

np.

that's definitely all i get.  the page is done loading, but src reveals no closing body or html tags.

i'll reset everything up with the latest svn and try again.
trinitywebhosting.com - Free Joomla! websites for churches and non-profits.

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Testing JFTP - Your help needed...

Post by friesengeist » Wed Apr 04, 2007 6:28 pm

lamad wrote: i'll reset everything up with the latest svn and try again.
Thanks a lot!

Maybe some fatal error, but error reporting turned off, like on all good production sites?
We may not be able to control the wind, but we can always adjust our sails

User avatar
Jonah
Joomla! Explorer
Joomla! Explorer
Posts: 299
Joined: Thu Aug 18, 2005 6:02 pm
Contact:

Re: Testing JFTP - Your help needed...

Post by Jonah » Wed Apr 04, 2007 6:32 pm

Now using the latest svn (including the changes you just made to ftp.php in 7089) and it gave me the exact same thing.  Also with error_reporting( E_ALL );

should i set $config->ftp_syst or is there anything else I should try?

Here's the setup I'm trying:




Client OS
Client Webserver
Client PHP Version
Server OS
FTP Server (version)



Gentoo
Lighttpd
5.1.6 pl11
Gentoo
Proftpd 1.3.1 rc2
Last edited by Anonymous on Wed Apr 04, 2007 6:43 pm, edited 1 time in total.
trinitywebhosting.com - Free Joomla! websites for churches and non-profits.

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Testing JFTP - Your help needed...

Post by ianmac » Wed Apr 04, 2007 6:52 pm

Enno, I'll try and do some testing near the end of the weekend if I get a chance...

I've got three units:
Ubuntu 6.10, Windows XP and FC5

I'll try some different ftp servers and different combinations.

Ian

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Testing JFTP - Your help needed...

Post by friesengeist » Wed Apr 04, 2007 7:09 pm

lamad wrote: should i set $config->ftp_syst or is there anything else I should try?
That's not needed for a start. It will only turn one "message" into a test when you specify it, so it's only for your convenience, but not neccessarily needed.
lamad wrote: Here's the setup I'm trying:




Client OS
Client Webserver
Client PHP Version
Server OS
FTP Server (version)



Gentoo
Lighttpd
5.1.6 pl11
Gentoo
Proftpd 1.3.1 rc2


Interesting, someone with Lighttpd. I was gonna try that server when I get some time, heard some good things about it ;) Also good that you have  a recent version of ProFTPd, as thats one server which is reported to cause problems in the 1.5 Q&T board.

From your previous results, I assume that the script dies when it tries to connect to 127.0.0.1 on port 1 - it's designed as a failing test, to tests that the library adheres to the timeout which it is given.

Maybe you could edit the FTP unittest file, to see which line is the last that's being executed? Put in a few echos, e.g.:

Code: Select all

	function testConnectFailed()
	{
echo "creating object...";
		$ftp = new JFTP(array('timeout'=>1));

		$before	= microtime_float();
echo "testing failing connect"; //etc...
		$return	= $ftp->connect('127.0.0.1', '1');
		$after	= microtime_float();

		$this->assertIdenticalFalse($return);
		$this->assertIdenticalTrue(($after - $before) assertNotA($ftp->_conn, 'resource');
		$this->assertError('JFTP::connect: Could not connect to host "127.0.0.1" on port 1');
	}
How long does the script run? If it reaches PHP's max_execution_time, it will die without any error.



ianmac wrote: Enno, I'll try and do some testing near the end of the weekend if I get a chance...
Great :) Thanks guys!
We may not be able to control the wind, but we can always adjust our sails

User avatar
Jonah
Joomla! Explorer
Joomla! Explorer
Posts: 299
Joined: Thu Aug 18, 2005 6:02 pm
Contact:

Re: Testing JFTP - Your help needed...

Post by Jonah » Wed Apr 04, 2007 7:25 pm

Ya, lighty has been treating me well so far.  The selling point for me is the scriptable configuration.  Even after using apache for 8 or 9 years it's config is still not intuitive... not to mention nearly as powerful as lighty's.

I was doing some investigation of my own, the unit tester seems to try every method that exists.  Specifically when SimpleRunner->run() attempts to call $invoker->invoke() with method 'testConnectFailed' it dies.

Update: Uh, that's exactly what you said.  I think I should have slept more last night.  :-)
Last edited by Anonymous on Wed Apr 04, 2007 7:33 pm, edited 1 time in total.
trinitywebhosting.com - Free Joomla! websites for churches and non-profits.

User avatar
Jonah
Joomla! Explorer
Joomla! Explorer
Posts: 299
Joined: Thu Aug 18, 2005 6:02 pm
Contact:

Re: Testing JFTP - Your help needed...

Post by Jonah » Wed Apr 04, 2007 7:46 pm

Ya, definitely could have been a little more awake on this one.  Of course the PHP I was using did not have ftp support compiled in.    libraries/joomla/client/ftp.php line 268 uses @ to suppress errors in the connect statement.  Removing the @ delivers the expected Fatal error: Call to undefined function ftp_connect()...

Why are errors suppressed for that line?  If they must be, I suppose a if function_exists could be placed somewhere.

Cheers,

Jonah
trinitywebhosting.com - Free Joomla! websites for churches and non-profits.

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Testing JFTP - Your help needed...

Post by friesengeist » Wed Apr 04, 2007 9:34 pm

lamad wrote: Why are errors suppressed for that line?  If they must be, I suppose a if function_exists could be placed somewhere.
Good catch! You got me wondering for a second...

Errors in the native ftp_xxx functions are suppressed, as the JFTP library makes extensive use of calls to JError. There are some functions where we actually expect an error in some cases, e.g. when deleting files or folders. Since we don't know if we are dealing with a file or folder before calling the delete function, the library tries both, and the first of both might throw an error. Another reason why the errors are suppressed is that the behaviour of the library should be almost the same when using the native PHP ftp functions and when using our emulation layer.

Now about the case that this error is not caught before running into it: actually, the unit test disables one certain functionality of the library - which is to autodetect if the native functions are available. Here's a bit from the beginning of the library:

Code: Select all

if (!defined('FTP_NATIVE')) {
	define('FTP_NATIVE', (function_exists('ftp_connect'))? 1 : 0);
}
So just for the test, we are overriding the FTP_NATIVE constant in the configuration file of the unit test. This is the only way to make JFTP use the emulated functions, even if the native functions are available. In a real world scenario, FTP_NATIVE should never be defined when entering the library. So this is more a bug in the unit test then in the library itself, I would say.

I have modified the default value for FTP_NATIVE in the unit test configuration to "false", so that newcomers don't run into this trap.
We may not be able to control the wind, but we can always adjust our sails

User avatar
Jonah
Joomla! Explorer
Joomla! Explorer
Posts: 299
Joined: Thu Aug 18, 2005 6:02 pm
Contact:

Re: Testing JFTP - Your help needed...

Post by Jonah » Thu Apr 05, 2007 1:26 pm

That makes sense.  I'll compile ftp support in so that I can properly test this out.

For testing, I was thinking about hitting a bunch of anon public access ftp servers out there.  That would provide a wide variety of test cases, but I believe that to test properly write access is required on the destination server.  Is this correct?
trinitywebhosting.com - Free Joomla! websites for churches and non-profits.

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Testing JFTP - Your help needed...

Post by friesengeist » Thu Apr 05, 2007 2:07 pm

lamad wrote: That makes sense.  I'll compile ftp support in so that I can properly test this out.

For testing, I was thinking about hitting a bunch of anon public access ftp servers out there.  That would provide a wide variety of test cases, but I believe that to test properly write access is required on the destination server.  Is this correct?
Yes, that's correct...
We may not be able to control the wind, but we can always adjust our sails

User avatar
Jonah
Joomla! Explorer
Joomla! Explorer
Posts: 299
Joined: Thu Aug 18, 2005 6:02 pm
Contact:

Re: Testing JFTP - Your help needed...

Post by Jonah » Fri Apr 06, 2007 2:57 pm

tested with r7098.  same setup as before.  14 fails, two exceptions.  results are attached.

what's the danger in having unittests available on the internet?  especially as html attachments are not allowed as attachments it would probably be easier for you if i posted the actual link.
You do not have the required permissions to view the files attached to this post.
trinitywebhosting.com - Free Joomla! websites for churches and non-profits.

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Testing JFTP - Your help needed...

Post by friesengeist » Fri Apr 06, 2007 5:36 pm

lamad wrote: tested with r7098.  same setup as before.  14 fails, two exceptions.  results are attached.
It's failing when it tries to "chdir /home/tuesday". Is there actually a directory /home/tuesday accessible via FTP? Looks more like an absolute path to me, unless you have configured your FTP server to serve your root directory "/"?

Could you create an empty directory within your home dir, and then set the FTP root just to that directory? E.g.
$config->ftp_root = '/test';
lamad wrote: what's the danger in having unittests available on the internet?  especially as html attachments are not allowed as attachments it would probably be easier for you if i posted the actual link.
You'd have to .htaccess protect the directory where the config file is located, to not expose your FTP password. Furthermore, I don't know if the unit test framework has been checked for security issues...
We may not be able to control the wind, but we can always adjust our sails

User avatar
Jonah
Joomla! Explorer
Joomla! Explorer
Posts: 299
Joined: Thu Aug 18, 2005 6:02 pm
Contact:

Re: Testing JFTP - Your help needed...

Post by Jonah » Fri Apr 06, 2007 8:01 pm

friesengeist wrote: It's failing when it tries to "chdir /home/tuesday". Is there actually a directory /home/tuesday accessible via FTP? Looks more like an absolute path to me, unless you have configured your FTP server to serve your root directory "/"?
Doh, my bad.  I'm too used to sftp and forgot that ftp was chrooted.

Ok this time I actually used cli ftp and manually did some of the same tests that this does to ensure ftp.config is setup properly and it does work.  Got more errors for you from the unit test.  File is attached.  Tried it with ftp set to /foo and foo and resulted in the same thing.
You do not have the required permissions to view the files attached to this post.
trinitywebhosting.com - Free Joomla! websites for churches and non-profits.

User avatar
Schlu
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 135
Joined: Sun Oct 23, 2005 4:01 pm
Location: Freiburg / Tettnang
Contact:

Re: Testing JFTP - Your help needed...

Post by Schlu » Sat Apr 07, 2007 12:53 pm

Tested on gentoo, proftp.

Hope this helps

schlu
You do not have the required permissions to view the files attached to this post.

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Testing JFTP - Your help needed...

Post by friesengeist » Sat Apr 07, 2007 5:46 pm

lamad wrote: Ok this time I actually used cli ftp and manually did some of the same tests that this does to ensure ftp.config is setup properly and it does work.  Got more errors for you from the unit test.  File is attached.  Tried it with ftp set to /foo and foo and resulted in the same thing.
A passing test, that's nice! Thanks Jonah! :)

About the difference in "/foo" and "foo": Some tests should fail without the leading slash. So you are getting the same results with and without the leading slash? Thats strange!


Schlu wrote: Tested on gentoo, proftp.

Hope this helps
Hey, cool, thank you, Schlu! :)

This does help much indeed, as I can see some new problems on the horizon...

a) Results between native mode and emulated mode are "a bit" different, which should not be the case. Edit: that was BS, results are the same for both operation modes (I looked at the output from another server, therefore the confusion on my side). One thing less to look after...
b) More serious: the response from your server does include the current dir "." and the parent dir "..", which none of the servers I tested did so far. However, I don't think it's not against the FTP protocol to incde these directories, so this would be something we will have to look at in our library. I'll double-check the FTP RFC before.

Do you know the version of your FTP server?
Last edited by friesengeist on Sat Apr 07, 2007 6:26 pm, edited 1 time in total.
We may not be able to control the wind, but we can always adjust our sails

User avatar
Schlu
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 135
Joined: Sun Oct 23, 2005 4:01 pm
Location: Freiburg / Tettnang
Contact:

Re: Testing JFTP - Your help needed...

Post by Schlu » Sat Apr 07, 2007 11:00 pm

Hi Enno,
friesengeist wrote: Do you know the version of your FTP server?
No, I only was able to find out that my hoster use a modified version of proftp. I will try to find out on which version this modifications were done. If required i can do another test on my testbox with proftp but I thought it would better to do the test on a production environment. If you need some testing space on the server where the results came from just contact me.

Gruß
schlu

User avatar
Jonah
Joomla! Explorer
Joomla! Explorer
Posts: 299
Joined: Thu Aug 18, 2005 6:02 pm
Contact:

Re: Testing JFTP - Your help needed...

Post by Jonah » Mon Apr 09, 2007 1:44 pm

Schlu wrote: Hi Enno,
friesengeist wrote: Do you know the version of your FTP server?
No, I only was able to find out that my hoster use a modified version of proftp. I will try to find out on which version this modifications were done. If required i can do another test on my testbox with proftp but I thought it would better to do the test on a production environment. If you need some testing space on the server where the results came from just contact me.

Gruß
schlu
Schlu, if you have ssh access the following command will tell you the version:

/usr/sbin/proftpd -v

If you don't have ssh access you could also try that command in a php file with passthru...  :-)
trinitywebhosting.com - Free Joomla! websites for churches and non-profits.

User avatar
Schlu
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 135
Joined: Sun Oct 23, 2005 4:01 pm
Location: Freiburg / Tettnang
Contact:

Re: Testing JFTP - Your help needed...

Post by Schlu » Mon Apr 09, 2007 5:52 pm

Thank's lamad,

I have shell access but this didn't work.
My hoster told me that the proftp version is 1.3. He will give me some more information soon.

schlu

User avatar
Jonah
Joomla! Explorer
Joomla! Explorer
Posts: 299
Joined: Thu Aug 18, 2005 6:02 pm
Contact:

Re: Testing JFTP - Your help needed...

Post by Jonah » Mon Apr 09, 2007 6:07 pm

friesengeist wrote: A passing test, that's nice! Thanks Jonah! :)
??? I was positive that it had errors when I posted that.  Odd...  Anyway, I'll run a bunch more then and update your chart.
trinitywebhosting.com - Free Joomla! websites for churches and non-profits.

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Testing JFTP - Your help needed...

Post by ianmac » Mon Apr 09, 2007 6:23 pm

Okay...  here are some results...  mainly for pureftpd and vsftpd.  Once the bugs get fixed, I will retest and test with the remainder of the vsftpd version (I only did 2.0 versions for now, but I have compiled everything from 1.0.1 up.

Client OS Client Webserver Client PHP Version Server OS FTP Server (version) Native mode Emulated mode Verified by
Edgy Eft Apache 2.0.55 38722 Edgy Eft ProFTPD 1.3.0 1/1 test cases complete: 149 passes, 37 fails and 28 exceptions. 1/1 test cases complete: 149 passes, 37 fails and 28 exceptions. Ianmac test1.html
Edgy Eft Apache 2.0.55 5.1.6 Edgy Eft Pure-FTPd 1.0.21 1/1 test cases complete: 181 passes, 5 fails and 0 exceptions. 1/1 test cases complete: 181 passes, 5 fails and 0 exceptions. Ianmac test2.html
Edgy Eft Apache 2.0.55 5.1.6 Edgy Eft Pure-FTPd 1.0.18 1/1 test cases complete: 182 passes, 4 fails and 0 exceptions. 1/1 test cases complete: 182 passes, 4 fails and 0 exceptions. Ianmac Test3
Edgy Eft Apache 2.0.55 5.1.6 Edgy Eft Pure-FTPd 1.0.19 1/1 test cases complete: 182 passes, 4 fails and 0 exceptions. 1/1 test cases complete: 182 passes, 4 fails and 0 exceptions. Test4
Edgy Eft Apache 2.0.55 5.1.6 Edgy Eft Pure-FTPd 1.0.20 1/1 test cases complete: 182 passes, 4 fails and 0 exceptions. 1/1 test cases complete: 182 passes, 4 fails and 0 exceptions. Ianmac Test5
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 2.0.5 1/1 test cases complete: 182 passes, 4 fails and 0 exceptions. 1/1 test cases complete: 182 passes, 4 fails and 0 exceptions. Ianmac Test6
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 2.0.4 1/1 test cases complete: 180 passes, 6 fails and 0 exceptions. 1/1 test cases complete: 180 passes, 6 fails and 0 exceptions. Ianmac Test7
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 2.0.3 1/1 test cases complete: 180 passes, 6 fails and 0 exceptions. 1/1 test cases complete: 180 passes, 6 fails and 0 exceptions. Ianmac Test8
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 2.0.2 1/1 test cases complete: 180 passes, 6 fails and 0 exceptions. 1/1 test cases complete: 180 passes, 6 fails and 0 exceptions. Ianmac Test9
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 2.0.1 1/1 test cases complete: 180 passes, 6 fails and 0 exceptions. 1/1 test cases complete: 180 passes, 6 fails and 0 exceptions. Ianmac Test10
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 2.0.0 1/1 test cases complete: 180 passes, 6 fails and 0 exceptions. 1/1 test cases complete: 180 passes, 6 fails and 0 exceptions. ianmac Test11
You do not have the required permissions to view the files attached to this post.

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: Testing JFTP - Your help needed...

Post by friesengeist » Tue Apr 10, 2007 12:31 am

Short update:

I've made two modifications in SVN rev. 7117:
1) The unit test does not test the results for listing directory contents of non-existing directories anymore. This is not neccessarily something we need in Joomla!, and since FTP servers differ quite a bit in the response codes here (some fail, some return empty result sets), we simply ignore this inconsistency in Joomla! 1.5. We might fix this in any later version, the interface of the according functions will stay the same.
2) Directory listings will be filtered for "." and "..", to have consistent return values for these functions.

This should fix most of the outstanding failing tests. I'm a bit unsure about Ian's tests against VSFTPD <= 2.0.4. The login seems to work, even with a wrong password!

Thanks for your work so far, everyone. :)

It would be great if you could update your SVN (both Joomla! trunk and the unit test) to the latest version, and run the previously failing tests again. I guess there will still be failures for ProFTPD 1.3.0, we'll need to take a closer look at that server.
We may not be able to control the wind, but we can always adjust our sails

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Testing JFTP - Your help needed...

Post by ianmac » Tue Apr 10, 2007 4:18 am

okay...

I updated my SVN, and I reconfigured my Fedora Core system so that the authentication was properly setup (vsftpd by default compiles in pam support, and so I had to do some messing around to get it to work, but I guess I had it setup so that as long as the user account name was right, then auth was successful.

So now, vsftpd is a pass.  I will do further testing on all the versions.

Ian

User avatar
Schlu
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 135
Joined: Sun Oct 23, 2005 4:01 pm
Location: Freiburg / Tettnang
Contact:

Re: Testing JFTP - Your help needed...

Post by Schlu » Tue Apr 10, 2007 4:25 pm

A successful test with pureftp 1.0.21 on gentoo

schlu
You do not have the required permissions to view the files attached to this post.

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Testing JFTP - Your help needed...

Post by ianmac » Tue Apr 10, 2007 4:44 pm

Here is more test data...

Edgy Eft Apache 2.0.55 5.1.6 Edgy Pure-FTPd 1.0.21 Pass Pass Ianmac
Edgy Eft Apache 2.0.55 5.1.6 Edgy Pure-FTPd 1.0.18 Pass Pass Ianmac
Edgy Eft Apache 2.0.55 5.1.6 Edgy Pure-FTPd 1.0.19 Pass Pass Ianmac
Edgy Eft Apache 2.0.55 5.1.6 Edgy Pure-FTPd 1.0.20 Pass Pass Ianmac
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 2.0.5 Pass Pass Ianmac
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 2.0.4 Pass Pass Ianmac
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 2.0.3 Pass Pass Ianmac
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 2.0.2 Pass Pass Ianmac
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 2.0.1 Pass Pass Ianmac
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 2.0.0 Pass Pass ianmac
Edgy Eft Apache 2.0.55 5.1.6 Edgy WU_FTP 2.6.2(1) Fail Fail Ianmac
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 1.2.2 Pass Pass ianmac
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 1.2.1 Pass Pass ianmac
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 1.2.0 Pass Pass ianmac
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 1.1.3 Pass Pass ianmac
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 1.1.2 Pass Pass ianmac
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 1.1.1 Pass Pass ianmac
Edgy Eft Apache 2.0.55 5.1.6 FC5 VSFTPD 1.1.0 Pass Pass ianmac

Data added April 10th:
Edgy Eft Apache 2.0.55 5.1.6 FC5 ProFTPD 1.3.0a Fail Fail ianmac


Would be curious to see what happened with Lamad's trial on VSFTPD.

Ian
Last edited by ianmac on Wed Apr 11, 2007 3:21 am, edited 1 time in total.

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Testing JFTP - Your help needed...

Post by ianmac » Wed Apr 11, 2007 4:10 am

Edgy Eft  Apache 2.0.55  5.1.6  FC5  ProFTPD 1.3.0    Fail  Fail  ianmac
Edgy Eft  Apache 2.0.55  5.1.6  FC5  ProFTPD 1.3.0a  Fail  Fail  ianmac
Edgy Eft  Apache 2.0.55  5.1.6  FC5  ProFTPD 1.3.1RC2 Pass  Pass  ianmac
Edgy Eft  Apache 2.0.55  5.1.6  FC5  ProFTPD 1.2.10  Fail  Fail  ianmac
Edgy Eft  Apache 2.0.55  5.1.6  FC5  ProFTPD 1.2.10RC1Fail  Fail  ianmac
Edgy Eft  Apache 2.0.55  5.1.6  FC5  ProFTPD 1.2.10RC3Fail  Fail  ianmac
Edgy Eft  Apache 2.0.55  5.1.6  FC5  ProFTPD 1.2.5   Fail  Fail  ianmac
Edgy Eft  Apache 2.0.55  5.1.6  FC5  ProFTPD 1.2.6   Fail  Fail  ianmac
Edgy Eft  Apache 2.0.55  5.1.6  FC5  ProFTPD 1.2.8   Fail  Fail  ianmac
Edgy Eft  Apache 2.0.55  5.1.6  FC5  ProFTPD 1.2.9   Fail  Fail  ianmac
Last edited by ianmac on Wed Apr 11, 2007 4:14 am, edited 1 time in total.


Locked

Return to “Quality and Testing - Locked and Archived”