Tag Archives: Managed Dedicated Servers

Linux: Recover data from the crash disk

If you have Linux flavour OS installed and if your disk is crashed then try following steps if you want to retrive data from ddrescue commands.

Ddrescue is a program that copies data from one file or block device to another,
it is a tool to help you to save data from crashed partition. It tries to read and if it fails it will go on with the next sectors, where tools like dd will fail. If the copying process is interrupted by the user it is possible to continue at any position later. It can copy backwards.
Install dd_rescue or ddrescue read more

Frontpage password reset

If you are not able to login to your frontpage with the same password with which you are able to login to your cpanel then there may have problem with the frontpage password configuration to get that sorted out just apply following step.

grep CpanelUsername /etc/shadow

which will show you your cpanel username and the second field with the encrypted password then

cat /home/CpanelUsername/_vti_pvt/service.pwd

you can see that there will be something like

# -FrontPage-

If the second field here do not match with the one in the /etc/shadow then you need to reset your fromtpage password. Just take th ebackup of the file /home/CpanelUsername/_vti_pvt/service.pwd. and then copy the sncrypted password from shadow file to hear. read more

Turning off the default directory listing

You can just put a blank file named index.html in that directory. A “more correct” way is to put a file named .htaccess in that directory consisting of only this line:Options -indexesWhat’s especially nice about doing it this way is all sub-directories of that directory will also get their directory listings turned off. You could then turn on indexes for one of those sub-directories just by making a .htaccess file in that directory with:Options +indexes

Cron – Explanation

Cron allows users to automate repetitive system administration tasks such as tape backups, database reorganization, and general file cleanups (such as emptying log files and queues).

The Crontab File’s Syntax
To tell cron what you want it to run, and how often you want it to run it, you need to create a crontab file. A crontab file is just a text file with the following syntax:


minute hour day-of-month month-of-year day-of-week command

Each of the above columns can be in one of the following formats (these examples are for the minute column):
Run command at 30 minutes past the hour. read more

To check badblock for HDD (hard disk)

use following command to check the badblocks of the hard drive (HDD)/sbin/badblocks -vv /dev/hdXXThis is a part of the e2fsprogs-1.27-3 rpm which is full of utilities used for file system.


How To: Give users SFTP access

How To: Give users SFTP access while not having shell access ****************************************************************Well, although most tend to believe you can’t, there is actually a way, it’s not officially supported in cPanel yet, but it does work.

First, create the user like normal, and give them Shell access. Now, using the command usermod you will change the users shell :

#usermod -s /usr/libexec/openssh/sftp-server username

Of course, changing the last “username” field to whatever the username is.

This path is correct on Redhat 7.3, but you might want to do:

#locate sftp-server

This will tell you the definite location of this application.

Now, your users will be able to use SFTP without a problem, they will also be able to SSH in, but as soon as they issue a command, it will boot them out (as it’s just the SFTP server) read more

Cpanel/ Webmail accessing behind firewall

Installation requires that you have access to cPanel, so you need to
use a system that isn’t behind a firewall to install it.

instructions –

1) Load up cPanel (www.yourdomain.com/cpanel or www.yourdomain.com:2085)
2) Add a subdomain called cpanel.
3) Copy the script cpanelproxy.php to the /public_html/cpanel/ directory.
4) Modify (or add) the file /public_html/cpanel/.htaccess to include
the following 3 lines:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/cpanelproxy.php
RewriteRule .* /cpanelproxy.php [last] read more