PDA

View Full Version : AjaXplorer with ISPConfig...


LTxda
25th October 2011, 00:17
I wanted to recommend AjaXplorer as an add-on or maybe for it to be distributed with ISPConfig. Great functionality, simple, extremely easy to setup, no database required, etc.

http://www.ajaxplorer.info/wordpress/

erosbk
8th November 2011, 21:12
Do you know how to make it work as ftp web client? I tried without success... I want users to use their ftp users to login directly to their directories.

Thanks!

LTxda
8th November 2011, 22:03
Do you know how to make it work as ftp web client? I tried without success... I want users to use their ftp users to login directly to their directories.

Thanks!

It is pretty straight forward. Once you install you can setup a repository which is the user's chrooted path to the file system and create a user assigned to that repository. It'll work similar to web ftp. It's a really nice interface, etc. Give it a try and report back for others to read about. Let me know if you have any more questions.

EDIT: I haven't looked to see if it can be configured to utilize existing accounts on the system to authenticate users so worse case you might have to setup users with the same user/pass as their ftp accounts and just point them to their ftp root.

erosbk
9th November 2011, 01:54
I made it work:


In conf.php, modify the following:

"AUTH_DRIVER" => array(
"NAME" => "ftp",
"OPTIONS" => array(
/* Id of the repository defined below */
"REPOSITORY_ID" => "dynamic_ftp",

/* Existing admin in the sense of ajaxplorer admin, to avoid alert at startup */
"ADMIN_USER" => "admin",

/* If you want your use to connect any FTP they want, set this to TRUE */
"FTP_LOGIN_SCREEN" => "false",

"TRANSMIT_CLEAR_PASS" => true)
),

$REPOSITORIES["dynamic_ftp"] = array(
"DISPLAY" => "FTP",
"DRIVER" => "ftp",
"DRIVER_OPTIONS" => array(
/* SEE access.ftp/manifest.xml for all available FTP parameters */
"FTP_HOST" => "ftp.domain.com",
"FTP_PORT" => "21",
"PATH" => "/",

/* use current ajax credentials */
"USE_SESSION_CREDENTIALS" => 1,
/* If you want your use to connect any FTP they want,
forget options above, and set this one to true*/
"DYNAMIC_FTP" => "False",

/* Set this to "rw", this will be the default rights for users */
"DEFAULT_RIGHTS" => "rw"
)
);



This will allow the user to login with his ftp user/pass directly to his home directory.

the problem is that, if the user writes a wrong user/password, it will login to ajax and will popup an error, but he will remain logued as the wrong user in ajax... I have to see how to workaround this...

LTxda
9th November 2011, 05:14
Nice! Thanks for posting the info. At least I'll have a reference if I have to do something similar. Greatly appreciated.

LTxda
9th November 2011, 05:19
Maybe if this is added to the ISPConfig package there can be options automating the setup for FTP integration, independent functionality or hybrid.

erosbk
9th November 2011, 14:26
Becarefull with this, if you use fail2ban to check for failed ftp login, you will ban the server IP or localhost IP.

This can be avoid using a regex in fail2ban.

Till, as I could see, integrating ajaxplorer with ispconfig as webftp client should not be difficult.

ISPConfig must create an ajaxplorer user/pass equal to ftpuser/pass when created (modified too when ftp pass is modified, etc), and a fixed repository must be declared in ajaxplorer.

Another option could be to use the table ftp_users for login purpose (I have to explore different options)

If this is viable, maybe I could work on it, but I don't know if you are taking the way of net2ftp as web ftp client.

Regards

till
9th November 2011, 14:45
In my opinion a webftp client like ajax explorer or net2ftp should stay a separate package like the webmail (roundcube, squirrelmail) and mysql (phpmyadmin) webclients. So each admin has the choice which FTP clients he wants to use and if he wants to use a webftp client at all.

If ajaxexplorer is a FTP client, it should be able to authenticate itself by FTP login like any other client?

erosbk
9th November 2011, 15:12
I need to investigate a little more about ajaxexplorer. It is a really complete program very usefull for file management and database management (among others).

Here you can read his features (just a few lines)
http://www.ajaxplorer.info/wordpress/documentation-3/chapter-introduction/

It can be configured to be used just as a simple ftp web client if someone wants (as I posted), but with a few changes it can be integrated with ispconfig.

It is very easy to use, visually it is lot better than net2ftp, and... as ftp, it allows drag and drop from desktop, preview of files (images included), direct file editing with indented code (very usefull for php code editing without file downloading).

I recommend you to test it.

LTxda
10th November 2011, 15:37
What I really liked is that I could point to any place on the servers's file system and lock a user into that repository. I wasn't restricted to just the ftp root for a user, etc. Really powerful, easy to use and looks great.

nveid
7th December 2011, 07:17
ISPConfig is a multi-server control panel that is accessed from one server.. How would something like this affect that functionality?

LTxda
7th December 2011, 07:28
Doesn't affect it at all. It run independent of other things on the server and doesn't even require a database. Pretty sweet too. :)

nveid
7th December 2011, 07:40
In my opinion a webftp client like ajax explorer or net2ftp should stay a separate package like the webmail (roundcube, squirrelmail) and mysql (phpmyadmin) webclients. So each admin has the choice which FTP clients he wants to use and if he wants to use a webftp client at all.

If ajaxexplorer is a FTP client, it should be able to authenticate itself by FTP login like any other client?

This sounds like an interesting implementation actually.. Most panels out there have a file explorer built into it. I actually administer some cpanel servers, and I think many novices really like that feature that are hosted. I believe yes it should stay a separate package, but perhaps a configuration option in the System module for if its installed or not. If its installed & configured in the System module, then in the sites section, provide an icon link to automatically autoauth into for the account.

till
7th December 2011, 09:25
There is already a icon link available that can be configured under System > Interface config to point the users to the webftp application that the administrator wants to provide for its customers.

automatically autoauth into for the account.

That would require to store the passwords in cleartext and I doubt that that will be a good idea.

nveid
7th December 2011, 10:47
That would require to store the passwords in cleartext and I doubt that that will be a good idea.
Perhaps there's a way to create a special auth module to work with this task?
Similar to how cpanel autoauths into phpmyadmin.. Which I believe we could easily create one for phpmyadmin looking at its auth documentation:

http://wiki.phpmyadmin.net/pma/Auth

till
7th December 2011, 11:23
Perhaps there's a way to create a special auth module to work with this task?

You would have to extend pure-ftpd for this, not sure if its c or c++ code.

Similar to how cpanel autoauths into phpmyadmin.. Which I believe we could easily create one for phpmyadmin looking at its auth documentation:

http://wiki.phpmyadmin.net/pma/Auth

Thats very different from ftp, as phpmyadmin supports it to use a global mysql user for logging in and applying restrictions in a different way. So thats not comparable with FTP.

nveid
7th December 2011, 11:36
Thats very different from ftp, as phpmyadmin supports it to use a global mysql user for logging in and applying restrictions in a different way. So thats not comparable with FTP.

I understand that.. Though from what I'm reading here (http://www.ajaxplorer.info/wordpress/documentation-3/documentation/chapter-plugins/), you can make authentication modules for this as well. Basically what I'm thinking, is that the actual ajaxexplorer could be on the remote server in a multi-server setup. And then do API call back to remote authenticate the connection with ISPConfig.... Haven't dove into it too much, though even it can't be done exactly like that, I'm sure there would be another way to do it nicely.

I have another big project I need to hit up soon.... But if no one tackles it, I'll probably look at this ajaxexplorer, and integrating other remote auth methods (particularly phpmyadmin) in the future with ISPConfig.