Just about all aspects of a VPS or dedicated server can be handled from the command line. Indeed, when it comes to complex management, installation of software, and configuration, the SSH commands are faster and more flexible. However, when it comes to file management, the command line is at an inherent disadvantage. The ability to quickly see the entire contents of a directory with scrolling capability, and quick and easy editing has been a strength of the GUI paradigm for years. Of course, you can always download and upload copies of files, but the one thing that’s missing in WHM is a proper file manager.
By default, SSH allows us to use an editing program called “vi” – a textbased interface for document management. It’s quite flexible, and indeed I use it myself for browser navigation via a plug-in. But despite that, it’s more clumsy and not as easy to use as a file manager of the type found in cPanel installations. So what’s the problem you say? Why can’t you simply go into cPanel and perform file management functions from there? For example, after running a security check on my server, I’m notified that the LF_SCRIPT_ALERT option is not enabled.
To fix this, I need to navigate to the “etc/csf” directory and make changes to the “csf.conf” file. However, when I log into my primary cPanel account and navigate to the location via the file manager, I find the “etc” folder empty.
This is because cPanel has inherent restrictions on the modification of basic system files that are accessible via WHM and SSH. As mentioned above, you can make changes using vi, but let’s install an actual file explorer instead. Fortunately for us, ConfigServer – the maintainers of the industry-standard ConfigServer Firewall or CSF – also offer a free ConfigServer Explorer (CSE). Let’s take a look at how to install it as well as its salient features.
I’m going to assume that you already know how to connect to your server via an SSH program like Putty. Once you’re logged in with root privileges, enter the following commands one by one as specified here:
cd /usr/src rm -fv /usr/src/cse.tgz wget http://www.configserver.com/free/cse.tgz tar -xzf cse.tgz cd cse sh install.sh rm -Rfv /usr/src/cse*
If everything proceeds smoothly, you will get a notification that ConfigServer Explorer has been installed as shown in the screenshot below:
Now login to WHM and check out the items on the left-hand side. There should be a new entry called ConfigServer Explorer. Click that and you will be taken to the root directory of your installation.
Keep in mind, that this is a very dangerous tool if used improperly. As the root user, there are no restrictions on what you can or cannot do, so make sure that you take backups of all files before you modify them. Over here, I navigate to the “etc” directory that I previously found empty using the cPanel file manager. As you can see in the screenshot here, this time it’s filled with configuration files.
So I navigate to the “csf” folder and locate the “csf.conf” file. While the features are not as slick as those found in the cPanel file manager, all the basic facilities are available. For example, you can click the “edit” link to the right-hand side and the file will open up in a textbased GUI interface within WHM itself where you can make the necessary modifications.
In the example above, it’s a trivial matter for me to use my browser’s search functionality to locate the line I want and change “0” into “1”. Saving the file is just a matter of hitting the “Save” button and you’re done!
Just to check whether or not it’s worked, I go back and run the security check once again. This time, the LF_SCRIPT_ALERT warning has turned green as expected.
So if you’re not feeling comfortable with a “command line only” file manager, you can download the ConfigServer Explorer for a pretty good GUI-based interface that’s as powerful as any textbased solution.