Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 18th October 2010, 14:31
Erih-Gres Erih-Gres is offline
Junior Member
 
Join Date: Oct 2010
Location: Crimea, Sevastopol
Posts: 11
Thanks: 6
Thanked 2 Times in 1 Post
Default

Good day Till!

What do think about this:

Create directory for extplorer:

Code:
cd /usr/share
mkdir extplorer
cd extplorer
Download and unzip extplorer:

Code:
wget http://sourceforge.net/projects/extplorer/files/extplorer/eXtplorer 2.1.0/eXtplorer_2.1.0b6.zip/download
unzip download
rm download
Set permissions:

Code:
chown root:root /usr/share/extplorer
chmod 777 /usr/share/extplorer
chown root:root /usr/share/extplorer/ftp_tmp
chmod 777 /usr/share/extplorer/ftp_tmp
Create the following symlink:

Code:
ln -s /usr/share/extplorer /usr/local/ispconfig/interface/web/
Reconfigure extplorer
Edit functions.php:

Code:
nano ./include/functions.php
Find line:

Code:
	return md5( $pass );
And replace it for:

Code:
//      return md5($pass);
        $return = 'bad_pass';
        $cnt=count($GLOBALS["users"]);
        for($i=0;$i<$cnt;++$i) {
                if(crypt($pass,substr($GLOBALS["users"][$i][1],0,12))==$GLOBALS["users"][$i][1]){
                        $return = $GLOBALS["users"][$i][1];
                        break;
                }
        }
        return $return;
Save file.
And edit .htusers.php file

Code:
nano ./config/.htusers.php
Clear this file and place this code:

Code:
<?php 
	// ensure this file is being included by a parent file
	if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access' );
$djin_dblocation = "localhost";
$djin_dbuser = "root";
$djin_dbpasswd = "your_mysql_root_password";
$djin_dbname="dbispconfig";

$djin_dbcnx = @mysql_connect($djin_dblocation,$djin_dbuser,$djin_dbpasswd);
if (!$djin_dbcnx) 
 {
 echo("<p>Cannot connect</p>");
 exit();
 }
if (!@mysql_select_db($djin_dbname, $djin_dbcnx))
 {
 echo( "<p>Connot select database</p>" );
 exit();
 }
$djin_sql=mysql_query ("SELECT `username`,`password`,`dir` FROM `ftp_user`");
$djin_count=0;
while ($djin_record = mysql_fetch_array($djin_sql)) {
$GLOBALS["users"][$djin_count][0]=$djin_record['username'];
$GLOBALS["users"][$djin_count][1]=$djin_record['password'];
$GLOBALS["users"][$djin_count][2]=$djin_record['dir'];
$GLOBALS["users"][$djin_count][3]='';
$GLOBALS["users"][$djin_count][4]=1;
$GLOBALS["users"][$djin_count][5]='';
$GLOBALS["users"][$djin_count][6]=1;
$GLOBALS["users"][$djin_count][7]=1;
$djin_count=$djin_count*1+1;
}
?>
Configure connect to database in lines:

Code:
$djin_dblocation = "localhost";
$djin_dbuser = "root";
$djin_dbpasswd = "your_mysql_root_password";
$djin_dbname="dbispconfig";
Reconfigure ISPConfig

Edit ftp_user_list.htm file:

Code:
nano /usr/local/ispconfig/interface/web/sites/templates/ftp_user_list.htm
After line:

Code:
              <div class="buttons icons16">
Write this line:

Code:
<a class="icons16 icoDbAdmin" href="extplorer/" target="extplorer"><span></span></a>
Save and exit.
And now in ftp users list we can see new button, what navigate us to extplorer.

Last edited by Erih-Gres; 18th October 2010 at 15:25.
Reply With Quote
The Following 2 Users Say Thank You to Erih-Gres For This Useful Post:
ahrasis (28th October 2010), till (18th October 2010)
Sponsored Links
  #12  
Old 18th October 2010, 15:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,202
Thanks: 829
Thanked 5,420 Times in 4,262 Posts
Default

Looks much better! One question though, is this line correct:

if(crypt($pass,substr($GLOBALS["users"][$i][1],0,12))==$GLOBALS$

or should it be something like this

if(crypt($pass,substr($GLOBALS["users"][$i][1],0,12)) {
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #13  
Old 18th October 2010, 15:32
Erih-Gres Erih-Gres is offline
Junior Member
 
Join Date: Oct 2010
Location: Crimea, Sevastopol
Posts: 11
Thanks: 6
Thanked 2 Times in 1 Post
Default

I'm sorry. I'm "copy-paste" from nano....
This string is to long...

Now it's right.

And, like always: sorry for my english.
Reply With Quote
  #14  
Old 15th May 2011, 22:17
lordblacksuca lordblacksuca is offline
Junior Member
 
Join Date: May 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hello, thanks for the info. I followed this steps, and everything worked good!!

the only problem that I have is when unzip files, the owner of them is the PHP user, wich is not the client:web user, so that files are not accessible then by the shell or FTP.


any idea?
Reply With Quote
  #15  
Old 16th May 2011, 21:39
Erih-Gres Erih-Gres is offline
Junior Member
 
Join Date: Oct 2010
Location: Crimea, Sevastopol
Posts: 11
Thanks: 6
Thanked 2 Times in 1 Post
Unhappy

Quote:
Originally Posted by lordblacksuca View Post
Hello, thanks for the info. I followed this steps, and everything worked good!!

the only problem that I have is when unzip files, the owner of them is the PHP user, wich is not the client:web user, so that files are not accessible then by the shell or FTP.


any idea?
No idea....
I don't know ISPConfig and eXtplorer code so good.
May be Till or Falko or someone else have any idea?

I can write, but i'm not linux-master.

Last edited by Erih-Gres; 16th May 2011 at 21:46.
Reply With Quote
  #16  
Old 16th May 2011, 22:22
lordblacksuca lordblacksuca is offline
Junior Member
 
Join Date: May 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks for the answer.

I also tried to find some way to run PHP from client#:web# user, without sucess.
Reply With Quote
  #17  
Old 17th May 2011, 11:59
soeren soeren is offline
Junior Member
 
Join Date: May 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by lordblacksuca View Post
Hello, thanks for the info. I followed this steps, and everything worked good!!

the only problem that I have is when unzip files, the owner of them is the PHP user, wich is not the client:web user, so that files are not accessible then by the shell or FTP.


any idea?
Hi lordblacksuca,

please read about your problem here:
http://extplorer.net/wiki/Frequently...ut-Whats-wrong

It's the same type of problems as described on the eXtplorer Wiki. you can get around this problem by running PHP in CGI/FastCGI mode or using mod_suphp instead of the normal PHP module for Apache.
If you edit your domain in ISPconfig and select "mod_suphp" (make sure it's installed!) or FastCGI, ISPconfig should care for setting up the Apache config files correctly. Just wait a moment and it should work.

ciao, Sören
Reply With Quote
  #18  
Old 18th November 2011, 18:47
adti adti is offline
Junior Member
 
Join Date: Nov 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default help my case using SSL "https://youdomain.com:8080/extplorer/" not run extplorer

Quote:
Originally Posted by Erih-Gres View Post
Good day Till!

What do think about this:

Create directory for extplorer:

Code:
cd /usr/share
mkdir extplorer
cd extplorer
Download and unzip extplorer:

Code:
wget http://sourceforge.net/projects/extplorer/files/extplorer/eXtplorer 2.1.0/eXtplorer_2.1.0b6.zip/download
unzip download
rm download
Set permissions:

Code:
chown root:root /usr/share/extplorer
chmod 777 /usr/share/extplorer
chown root:root /usr/share/extplorer/ftp_tmp
chmod 777 /usr/share/extplorer/ftp_tmp
Create the following symlink:

Code:
ln -s /usr/share/extplorer /usr/local/ispconfig/interface/web/
Reconfigure extplorer
Edit functions.php:

Code:
nano ./include/functions.php
Find line:

Code:
	return md5( $pass );
And replace it for:

Code:
//      return md5($pass);
        $return = 'bad_pass';
        $cnt=count($GLOBALS["users"]);
        for($i=0;$i<$cnt;++$i) {
                if(crypt($pass,substr($GLOBALS["users"][$i][1],0,12))==$GLOBALS["users"][$i][1]){
                        $return = $GLOBALS["users"][$i][1];
                        break;
                }
        }
        return $return;
Save file.
And edit .htusers.php file

Code:
nano ./config/.htusers.php
Clear this file and place this code:

Code:
<?php 
	// ensure this file is being included by a parent file
	if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access' );
$djin_dblocation = "localhost";
$djin_dbuser = "root";
$djin_dbpasswd = "your_mysql_root_password";
$djin_dbname="dbispconfig";

$djin_dbcnx = @mysql_connect($djin_dblocation,$djin_dbuser,$djin_dbpasswd);
if (!$djin_dbcnx) 
 {
 echo("<p>Cannot connect</p>");
 exit();
 }
if (!@mysql_select_db($djin_dbname, $djin_dbcnx))
 {
 echo( "<p>Connot select database</p>" );
 exit();
 }
$djin_sql=mysql_query ("SELECT `username`,`password`,`dir` FROM `ftp_user`");
$djin_count=0;
while ($djin_record = mysql_fetch_array($djin_sql)) {
$GLOBALS["users"][$djin_count][0]=$djin_record['username'];
$GLOBALS["users"][$djin_count][1]=$djin_record['password'];
$GLOBALS["users"][$djin_count][2]=$djin_record['dir'];
$GLOBALS["users"][$djin_count][3]='';
$GLOBALS["users"][$djin_count][4]=1;
$GLOBALS["users"][$djin_count][5]='';
$GLOBALS["users"][$djin_count][6]=1;
$GLOBALS["users"][$djin_count][7]=1;
$djin_count=$djin_count*1+1;
}
?>
Configure connect to database in lines:

Code:
$djin_dblocation = "localhost";
$djin_dbuser = "root";
$djin_dbpasswd = "your_mysql_root_password";
$djin_dbname="dbispconfig";
Reconfigure ISPConfig

Edit ftp_user_list.htm file:

Code:
nano /usr/local/ispconfig/interface/web/sites/templates/ftp_user_list.htm
After line:

Code:
              <div class="buttons icons16">
Write this line:

Code:
<a class="icons16 icoDbAdmin" href="extplorer/" target="extplorer"><span></span></a>
Save and exit.
And now in ftp users list we can see new button, what navigate us to extplorer.
help my case using SSL "https://youdomain.com:8080/extplorer/" not run extplorer
Reply With Quote
  #19  
Old 8th December 2011, 09:52
ahrasis ahrasis is offline
Junior Member
 
Join Date: Aug 2010
Posts: 9
Thanks: 1
Thanked 3 Times in 1 Post
Default

Quote:
Originally Posted by adti View Post
help my case using SSL "https://youdomain.com:8080/extplorer/" not run extplorer
Open this file using nano or whatever editor:

Code:
nano /usr/share/extplorer/include/init.php
Find:

Code:
if ($_SERVER['SERVER_PORT'] == 443 ) {
Change 443 to your SSL port number.

It should work, IMO.

Note: I am working on a different approach though as the prescribed method limits the ability to upload and extract to the users thus is not working as it supposed to be.
Reply With Quote
  #20  
Old 13th November 2013, 21:24
webguyz webguyz is offline
Senior Member
 
Join Date: Oct 2012
Location: Earth
Posts: 100
Thanks: 30
Thanked 13 Times in 11 Posts
 
Default

I know this is a super old post, but I just found about eXTplorer. Was trying to get Net2ftp working but really did not care for the clunky looking interface. Ran across this while doing some searches and love the look and feel of this file manager.

Was wondering if anyone has this file explorer integrated into 3.0.5.3 or if they knew that these instructions still apply.

Thanks!
__________________
= WebGuyz.Net =
VPS and Web Hosting
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:26.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.