ftp Proftpd error

Error when ftp to a domain

DS28220.domain.com proftpd[16643]: error: no valid servers configured
DS28220.domain.com proftpd[16643]: Fatal: error processing configuration file ‘/etc/proftpd.conf’

Edit the /etc hosts file and put the IP and the name in it:

Nano /etc/hosts

Restart xinetd

service xinetd restart

Email Deferred/Greylisting error

Getting email logs that show the following?

mail qmail-queue-handlers[8672]: Handlers Filter before-queue for qmail started …Jul 7 14:17:18 mail qmail-queue-handlers[8672]: from=domain@domain.comJul 7 14:17:18 mail qmail-queue-handlers[8672]: to=domain@domain.comJul 7 14:17:18 mail greylisting filter[8673]: Starting greylisting filter…Jul 7 14:17:18 mail qmail-queue-handlers[8672]: handlers_stderr: DEFERJul 7 14:17:18 mail qmail-queue-handlers[8672]: DEFER during call ‘grey’ handlerJul 7 14:17:26 mail pop3d: Connection, ip=[::ffff:203.197.xx.xx]Jul 7 14:17:26 mail pop3d: LOGOUT, ip=[::ffff:203.197.xx.xx]

In this case its referring to greylisting which you can choose to disable if you wish, http://kb.parallels.com/en/6359 is an article that refers to it.

Or run:

/usr/local/psa/bin/grey_listing --update-server -status off

What is uplink port speed on a dedicated server?

What is uplink port speed on a dedicated server with 100MBPS port?

Put another way, there are 8 bits to a byte, 1024 bytes to a kilobyte and 1024 kilobytes to a megabyte. 100 Mbits = 100/8 MBytes = 12.4 MBytes/sec; 10 Mb = 1.24 MB/sec.

1Gbps uplink (would max out at around 125MB/sec).

In terms of dedicated servers, the uplink port speed is most likely the speed of the connection between the server and the router to the backbone. If the host company’s connection to the ‘net in general is faster than your uplink speed (most likely the case), then the uplink port speed will be a bottleneck.

Measure of file size: KBps
File size i.e. how big the file or how much space a file occupies in the hard disk measured in terms of KiloBytes (KB upper case “K” and upper case “B”). In computing terms the upper case “K” stands for 1024. 1024 is computed from 210. (2 power 10). 2 denote the number of characters in the binary system which is used to store data in the disc (ones and zeroes).
Other abbreviations like mega, giga and terra also use the base as 1024,

1KB (KiloByte) = 1024 Bytes (approximately 1000 Bytes)
1MB (MegaByte) = 1024 KB (approximately 1000 KiloBytes or 1 million Bytes)
1GB (GigaByte) = 1024 MB (approximately 1000 MegaBytes or 1 billion Bytes)
1TB (TerraByte) = 1024 GB (approximately 1000 GigaBytes or 1 trillion Bytes)

Measure of data transfer speeds: kbps
Data transfer speed over the networks (including the internet) is calculated in terms of bits per second: kilobits (kb small case “k” and small case “b”). The higher the kbps i.e. more the bits transferred per second, more the speed, faster the network/connection. Here k stands for 1000 (103 )

1 kbps (kilo bits per second) = 1000 bits per second
1 Mbps (mega bits per second) = 1000 kilo bits per second.
1 Gbps (giga bits per second) = 1,000 mega bits per second.

ISP bandwidth and download speeds
The most common confusion caused by the similarity of KBps and kbps is when it comes to internet bandwidth and download speeds. People often complain that their ISP promised 512kbps connectivity but they are seldom able to download any file at 512 KBps. They fail to notice the difference in cases of the units and hence think their ISP is cheating them or offering them poor quality service. As mentioned earlier data transfer speeds are always calculated in terms of kilo bits per second (kbps) so an ISP connectivity of 512 kbps promises of transfer of at the max 512 kilo bits per second.

On the other hand, file size measure is always in Kilo Bytes and thus download speeds are always calculated based on how many Bytes per second are downloaded and hence Kilo Bytes per second (KBps). KBps and kbps are not interchangeable.

So an internet connectivity of say 512kbps can never achieve a download speed of 512 KBps. To calculate the maximum download speed of a “X kbps” connection, we need to use a simple formula as below.

Download KBPS speed = (Kbps value*1000) /8)) / 1024.

I.e. For a connectivity of 512 kbps

kbps value * 1000 = 512 * 1000 = 512000

512000 / 8 = 64000

64000 / 1024 = 62.5 KBps

Therefore theoretically an internet connection of 512kbps bandwidth can download at a speed of 62.5 KBps

If you don’t want to go through all the hassles of the above formula, just multiply the kbps value with 0.1220703125 to get the KBps value.

512 kbps * 0.1220703125 = 62.5 KBps. Simple!

Internet connectivity Download speed (approx)
256 kbps 31.3 KBps
384 kbps 46.9 KBps
512 kbps 62.5 KBps
768 kbps 93.8 KBps
1 mbps ~ 1000kbps 122.1 KBps

FTP error – ECONNREFUSED – Connection refused by server-Proftp

When connecting to the server via ftp and you are sure about the credentials and the firewall rules and iptables. Check DNS and the proftpd.conf file:

# dig domain.com
domain.com.       21599   IN      A       216.xx.xx.xx

# nano /etc/proftpd.conf
Port                            21
MasqueradeAddress       216.xx.xx.xx
PassivePorts                    60000 65000

Check the MasqueradeAddress feature and see if matched your IP for the domain you are connecting to.

Also – if behind a firewall…

Create a VirtualHost for 216.xx.xx.xx with the following configuration:

ServerName "ProFTPD"
MasqueradeAddress 216.xx.xx.xx
PassivePorts 60000 65000

Move Data from Slaved Drive – Plesk

First you will want to set up subscriptions for the domains in the plesk panel. Once they are created you can run the commands below:

Here are a few commands that should help.

1.) rsync example. This will move the data from one drive to the other.

rsync -avz /mnt/slave/var/www/vhosts/"domain name"/httpdocs /var/www/vhosts/"domain name"/httpdocs

You will want to change the “domain name” to the one you are working on at the time.

2.) Changing ownership:

chown -R "ftpusername":psacln /var/www/vhosts/"domain name"/httpdocs/*

You will want to change the “ftpusername” to what you set up for each domain when creating the subscription.

If the sites are simple, these are the only 3 steps you should need to take for each domain.


I would use the rsync command rather than cp. Rsync will keep permissions the same. The command would look something like:

rsync -aPSv /mnt/olddrive/var/www/vhosts/domain.com/httpdocs/somedirectory/ /var/www/vhosts/domain.com/httpdocs/restoredirectory/

You can also preview what will be synced by adding –dry-run to the command. This doesn’t actually copy anything, just shows you what’s going to happen e.g.

rsync -aPSv /mnt/olddrive/var/www/vhosts/domain.com/httpdocs/somedirectory/ /var/www/vhosts/domain.com/httpdocs/restoredirectory/ --dry-run

The databases are in /mnt/olddrive/var/lib/mysql

One thing you might try is to stop mysql, change datadir in /etc/my.cnf to /mnt/olddrive/var/lib/mysql, then restart mysql and dump your databases. Then stop mysql, revert datadir back and restart mysql again.

When MySQL is running using the slaved drive as the datadir, you can use this to log in to MySQL:

mysql -uadmin -p`cat /mnt/olddrive/etc/psa/.psa.shadow

alternately you can set skip-grant-tables in the /etc/my.cnf file until you have things running again.

You can either dump your databases as one file or as separate files for each DB – http://www.commandlinefu.com/commands/view/2916/backup-all-mysql-databases-to-individual-files

Show Cron Jobs

How do I view currently setup or all running cron jobs under Linux operating systems?

The cron service searches its spool area (usually /var/spool/cron/crontabs) for crontab files (which are named after user accounts); crontabs found are loaded into memory. cron also reads /etc/crontab, which is in a slightly different format. Additionally, cron reads the files in /etc/cron.d: it treats the files in /etc/cron.d as in the same way as the /etc/crontab file. The intended purpose of /etc/cron.d/ directory feature is to allow packages that require finer control of their scheduling than the /etc/cron.{daily,weekly,monthly} directories to add a crontab file to /etc/cron.d.View Users Cronjob

Use the following syntax to view username users cronjob:

crontab -u userName -l
crontab -u username -l

View Root User Cronjob

Just type the following command:

crontab -l

View /etc/crontab

A cronjob can be also run from /etc/crontab file. To view it, enter:

# less /etc/crontab

View Daily Cronjob

Type the following commands:

cd /etc/cron.daily/
ls -l
cat filename

View Hourly Cronjobs

Type the following commands:

cd /etc/cron.hourly/
ls -l
cat filename

View Weekly Cronjobs

Type the following commands:

cd /etc/cron.weekly/
ls -l
cat filename

View Monthly Cronjobs

Type the following commands:

cd /etc/cron.monthly/
ls -l
cat filename

View Software (Package) Specific Cronjobs

Type the following commands

cd /etc/cron.d/
ls -l
cat filename

Mysql and System time diffrence

MySQL time zone different from system time zone

the system time zone will be different than the one in MySQL, even though MySQL is set to use the system time zone. This normally means that a user has changed the system time zone, but they haven’t started MySQL to cause it to change as well.

$ date
Sun Jul  1 11:32:56 CDT 2007

mysql> show variables like '%time_zone%';
| Variable_name    | Value  |
| system_time_zone | PDT    |
| time_zone        | SYSTEM |
2 rows in set (0.00 sec)

If you find yourself in this situation, just restart MySQL and the situation should be fixed:

mysql> show variables like '%time_zone%';
| Variable_name    | Value  |
| system_time_zone | CDT    |
| time_zone        | SYSTEM |

Addon – check mysql time

mysql> select NOW();
| NOW() |
| 2014-06-20 19:07:05 |
1 row in set (0.00 sec)

Plesk Configuration Error

I get this message in plesk. I’m not sure how to fix the errors

New files of configuration for Apache web server were not built due to errors in configuration templates: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf:

Sometimes this has something to do with the config generation and it can give you more info if you try running the reconfiguration from the commend line.

You can do this by running

/usr/local/psa/bootstrapper/pp11.0.9-bootstrapper/bootstrapper.sh repair


/usr/local/psa/admin/sbin/httpdmng --reconfigure-all

Plesk 10 and later versions:

# /usr/local/psa/admin/bin/httpdmng --reconfigure-domain <domain_name>

Plesk 9 and earlier versions:

# /usr/local/psa/admin/bin/websrvmng --reconfigure-vhost --vhost-name=<domain_name>

Note: Replace with the actual domain name.

If the issue occurs for all domains, you could run this command:

Plesk 10 and later versions:

# /usr/local/psa/admin/bin/httpdmng --reconfigure-all

Plesk 9 and earlier versions:

# /usr/local/psa/admin/bin/websrvmng --reconfigure-all

Plesk Failed Upgrade

Failed to update Panel. To solve this problem, you can send the update log to Parallels support. View the update logs (June 18, 2014). View the update logs (June 19, 2014). Copy the logs to your computer before you close this message. To close this message, click here.

Plesk log shows:

ERROR: Failed to run the Yum utility.
The Yum utility failed to install the required packages.
Attention! Your software might be inoperable.
Please, contact product technical support.


Check for the atomic repo and disable it.

cd /etc/yum.repos.d/
nano atomic.repo
# Name: Atomic Rocket Turtle RPM Repository for CentOS / Red Hat Enterprise Lin$
# URL: http://www.atomicrocketturtle.com/
# Note: This isn't covered by ASL support. -Scott
name = CentOS / Red Hat Enterprise Linux $releasever - atomicrocketturtle.com
mirrorlist = http://www.atomicorp.com/mirrorlist/atomic/centos-6-$basearch
#mirrorlist = http://www.atomicorp.com/channels/atomic/centos/6/mirrors-atomic
enabled = 1
priority = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art.txt
gpgcheck = 1

Set enabled = 1 to enabled = 0
Then run:

yum update --enablerepo=atomic atomic-release

This should resolve the error.


/usr/local/psa/admin/sbin/autoinstaller --select-release-current --reinstall-patch --install-component base


yum upgrade atomic-release 

Other resources: http://kb.odin.com/en/116189