Page 1 of 1

Adding web based file manager

Posted: Thu Aug 21, 2014 6:00 am
by thegillion
I have been wanting a file manager on Vesta for sometime now. So I have taken matters into my own hands.

Here is a how to setup navphp4.44 to manage files on your admin login.
**NOTE I was using CentOS 6.5 your file paths may need to be changed**

Tools used.
Filezilla
Notepad++

1.Patch your nav bar in your panel. Go to /usr/local/vesta/web/templates/admin and edit panel.html Add this on line 12

Code: Select all

<a class="top-<?php if($TAB == 'NAVPHP' ) echo 'selected-' ?>link" href="/navphp/"> <?php print __('Nav PHP') ?> </a>
Save (you should now see "Nav PHP" on the top nav bar.)

2.Make a folder in /usr/local/vesta/web called navphp

3.Download and unzip navphp4.44 http://sourceforge.net/projects/navphp/ ... or%204.44/

4.Open config.php edit the following

Code: Select all

//$homedir = $_SERVER['DOCUMENT_ROOT'];
$homedir = "/home";
		# Default directory for single user. Use absolute path.
$enable_login = false;
Save

5.Delete index.php and rename windows.php to index.php

6.**DO NOT FORGET THIS STEP** this is for SSO of the panel if you do not do this step your manager will be open to the world.
Add the following at line 22 in index.php

Code: Select all

// Init
error_reporting(NULL);
ob_start();
session_start();
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");

if ($_SESSION['user'] == 'admin') {
Add the following at line 212

Code: Select all

}

header("Location: /navphp/");
exit;
7.Upload your navphp4.44 to /usr/local/vesta/web/navphp

You should now have navphp installed on your server with a navbar link.

Re: Adding web based file manager

Posted: Tue Aug 26, 2014 6:57 am
by head
Some issues.
1. header("Location: /navphp/"); in the end of your post - for what? it makes infinite loop.
2. Better to open navphp in new tab - there's no "back to Vesta" link
3. Nav unable to review other users folders - no sufficient rights
Overall good idea but only if you use single account "admin" on Vesta.

Re: Adding web based file manager

Posted: Sun Aug 31, 2014 12:03 am
by mishra.amitkr
or you could try out pydio or net2ftp

i did try but could not get luck to get it working...

Re: Adding web based file manager

Posted: Sun Aug 31, 2014 9:58 pm
by inerd
All modifications made to the Vesta web code will be reset after each update they will release :L

Re: Adding web based file manager

Posted: Sat Feb 14, 2015 4:40 am
by Avalon
This solution doesn't works...
After all steps I have "Internal vesta error" on adress https://xxx.xxx.xxx.xxx:8083/navphp/

Re: Adding web based file manager

Posted: Sat Feb 14, 2015 5:17 pm
by skurudo
May be need to search in error log the reason, why script don't work?

Re: Adding web based file manager

Posted: Wed Feb 14, 2018 9:00 am
by skurudo
Closed due inactivity.