Using Net2FTP as File Manager for VestaCP
| |Web based file manager is one of feature that many users are considering when choosing which hosting Control Panel to use. Let’s take WHM/cPanel for example, it is now being a popular paid control panel used by many web hosting company. And one of many factors made its users love cPanel is its File Manager feature. But that’s a paid control panel so users deserve all that awesomeness. Now what about free control panel like VestaCP? I posted about how to install Pydio file manager (It was Ajaxplorer for zPanel) on VestaCP but still it has some drawbacks and users are confused how to use it. So here it is I come with another tutorial for you to get a usable web based file manager to manage, organize and edit your web files right from your browser without having to open Putty or Filezilla.
Prerequisites
what you’ll need:
- A SSH client like Putty and basic knowledge about how to use it.
- Basic knowledge about common Unix command to SSH to your server.
- A server or VPS with at least 512MB of RAM (1GB recommended). If you not already have one then you can read my list of recommended VPS providers or this top low end cloud server providers. Quick recommendation: Atlantic.net, Digital Ocean and RamNode.
- Make sure your server is running one of VestaCP’s supported OS: RHEL 5/6, CentOS 5/6, Debian 7 or Ubuntu 12.04/12.10/13.04/13.10/14.04. Using minimal template is recommended.
- About 20 minutes of your time
- a cup of coffee or tea.
Stage 1 – Installing VestaCP
Before we continue, I should tell you that the tutorial below done in a VPS with 512MB RAM running CentOS 6.6 32-bit. It is recommended to use higher RAM. You have to adjust the command if your server is running other than CentOS.
Step 1 – Login to your server as root
Step 2 – Install Vesta CP using command below:
curl -O http://vestacp.com/pub/vst-install.sh bash vst-install.sh
Step 3 – It will then ask you with series of questions. Just answer it accordingly:
Step 4 – Once done you’ll see something like this which you can see your login URL along with admin username and some random password (you can change that later).
More explanation and screenshots:
Stage 2 – VestaCP Basic Configuration
Some tasks you have to firstly proceed are:
- Changing default admin password
- Adjust hosting package configuration
- Add new website on it (DNS entries will be generated automatically via this task)
- Add new database on it (if your website need it)
- Uploading / migrating your website on it
I don’t explain it again because it is explanatory or you can simply refer to my previous guides:
Configuration I use for the purpose of this tutorial:
- VestaCP user: admin
- Domain: servermomtest.org (doesn’t exist, test purpose only)
- Package: Default (httpd, nginx and named – all default)
- App: WordPress installed.
- Web directory: /home/admin/web/servermomtest.org/public_html
Stage 3 – Installing Net2FTP
About Net2FTP: It is basically a web-based FTP client but it has all common features a web based file manager also has but it use FTP as connection to connect you as user with your server so you can have access to all your web files and folders.
Main key features:
- Browse your web directories
- Upload and download files
- Edit files via built-in file editor
- Copy, delete, rename and move files and folders.
- Source code editor (with syntax highlighting)
- Zip and unzip files
- Search files, etc.
How to install Net2FTP on Vestacp Server
Step 1 – Open up Putty or Terminal and SSH (login) to your server as root or user with root (sudo) privilege:
Step 2 – Navigate to one of your web directories (choose one website as main one). For example I use servermomtest.org and create new folder. Name that folder as filemanager:
cd /home/admin/web/servermomtest.org/public_html mkdir filemanager cd filemanager
Replace servermomtest.org with your own domain name. screenshot
Step 3 – Download latest stable version of Net2FTP and extract the package:
wget http://www.net2ftp.com/download/net2ftp_v1.0.zip unzip net2ftp_v1.0.zip
Step 4 – It will create a new directory called net2ftp_v1.0, so go inside that folder, move all files and folders to upper directory then delete the empty folder:
cd net2ftp_v1.0 (shopt -s dotglob; mv -- * ..) cd .. rmdir net2ftp_v1.0
here’s the illustration:
Step 5 – Go to files_to_upload directory and move all the content to upper directory:
cd files_to_upload (shopt -s dotglob; mv -- * ..) cd .. rmdir files_to_upload
Step 6 – Change permission of temp directory to 777:
chmod 777 temp
Step 7 – Next, edit the settings.inc.php file using your favorite text editor like Nano:
nano settings.inc.php
It will look like this:
There are few parameters you can adjust inside that setting file. All the basic but necessary things you have to edit are: email address, admin username, admin password, turn your logging on / off (MySQL database needed), choose if you want to set a daily consumption limit (requires a MySQL database).
If you want to use your server as web hosting providers than you should turn logging on and set daily consumption limit. But you can leave those off if you just plan to use it as personal hosting server.
Another important settings:
Allow or not large file uploads and transfers (set the limit coz by default is set to 10MB)
As for me, because I just want to use the server as personal hosting so what I did is just defining admin password.
Done adjusting settings? You can now save changes and exit the editor (in Nano it is Control+O then Control+X)
That’s it.
Stage 4 – Give it a run
Now you have installed Net2FTP on your server which is accessible at:
http://yourdomain.tld/filemanager
Open up your web browser and go that url (replacing it with your real domain)
If you’ve set up an A record for your ftp url in DNS manager then you can use ftp.yourdomain.tld or alternatively simply put your VPS IP address there.
For Username and password field, use the username and password you use to login to VestaCP which my example is admin. If you created another Vestacp user for your clients, then you can tell them to use their Vestacp username and password to access their website’s files and folders via the same url above.
Once you logged in, you’ll see something similar to this:
all files of your website(s) are located at /web/domain.tld/public_html
All menus explain clearly what task each of them is capable of, so do not hesitate to try them.
Enjoy,.. please do not hesitate to drop comment below.
Excellent writeup Sawiyati, it shows your command over the subject which I admire very much. One question please: at present i am using winscp to transfer files to and from vestacp so can I do the same installation of net2ftp following the steps as you have described above via winscp like creating filemanager dir and then doing changes to settings.inc.php file, you think it is possible and will net2ftp work correctly. Thank you.
I believe it will work just fine
Yes I just finished installing net2ftp by my method and it works beautifully, Thanks Sawiyati for your help.
Hi, I have just noticed that you have installed net2ftp in a domain(anydomain.com) but if net2ftp is installed in a domain then the it will not function as a real file manager like in case of cpanel file manager which is installed in root so that all or any domains hosted the file manager will see all domains, any views on how to install net2ftp in vestacp root so that all domains are visible to it. TY
Mom, I got error 500 code when accessing the URL after all complete installation as described here. I’m running centos 6.7
try chown the folder to user admin and group admin
Vestacp no file manager available. inconvenient too. thank you.
Your posts helped me a lot with VestaCP.
Thank you for all your great tutorials.
Greetings sent from Brazil.
I intend to use the net2ftp for multiple domains (of my own not other users) and I have ftp accounts for each domain like “ftp.mydomain.com”. If I install it on each domains’ public_html folder (in vestacp), I would have multiple (duplicate) net2ftp files on my server occupying unnecessay hosting space.
My question is – How can I configure it like roundcube which has single install but can be used to manage any email account on server.
I belive that it can be installed on “/etc/net2ftp/” directory (in Ubuntu 14.04 ) and apache can be configured to use net2ftp as alias. Kindly post the guide to install and configure on Ubuntu 14.04, Vestacp.
Regards,
Sunit