Freeing disk space on your Linux server

To find out where disk space is being used:

Get to the root of your machine by running

# cd /


# sudo du -h --max-depth=1

Note which directories are using a lot of disk space.
cd into one of the big directories.

# ls -l

to see which files are using a lot of space. Delete any you don’t need.
Repeat steps to run once you cd into the directory with the largest size

sudo du -h --max-depth=1

FTP Error for Plesk Server – 421 Service not available, remote server has closed connection

FTP is not working and has the following error:
421 Service not available, remote server has closed connection

Also, in the message logs:
Plesk Unable to FTP – missing scoreboard file (Linux)

On CentOS 6 and 7 if you experience issues logging on to FTP server please check the logs for the following:

# tail -f /var/log/messages

Look for this error:

proftpd[11951]: fatal: ScoreboardFile: : unable to use '/var/run/proftpd/scoreboard': No such file or directory on line 74 of '/etc/proftpd.conf'

Check in /var/run for a proftpd folder, if it’s missing you have a bug in your ProFTPd version usually caused by using the Atomic repo to update ProFTPd.

Check for atomic:

# ls -la /etc/yum.repos.d/ | grep atomic
-rw-r--r--.   1 root root   827 May 18  2016 atomic.repo

The solution is to remove the package and reinstall from Plesk repo:

rpm -e --nodeps psa-proftpd
plesk installer --select-release-current --install-component=proftpd
service xinetd restart

Then you should be able to connect again. Please note that any changes to proftpd.conf such as enabling custom PassivePorts will be lost and need to be recreated.


Change Windows RDP SSL Cert from Default to Comodo Free SSL

This article describes how to change the SSL cert for you Windows server to match a hostname so that when you remote desktop to a windows server, you don’t get a warning for the identity and the SSL cert.

Go to Sectigo (Comodo) and sign up for a free ssl.

First, generate a CSR.


Set up the CSR

Godaddy –

CSR Generation: Using certreq (Windows)
This article is for administrators who prefer the command shell!

Save the following file as request.inf on your server editing the subject according to the comment:

;----------------- request.inf -----------------

Signature="$Windows NT$"

Subject = "C=US," 

KeySpec = 1
KeyLength = 2048
Exportable = TRUE
MachineKeySet = TRUE
SMIME = False
PrivateKeyArchive = FALSE
UserProtected = FALSE
UseExistingKeySet = FALSE
ProviderName = "Microsoft RSA SChannel Cryptographic Provider"
ProviderType = 12
RequestType = PKCS10
KeyUsage = 0xa0
HashAlgorithm = SHA256 

OID= ; this is for Server Authentication / Token Signing

then run

certreq -new request.inf request.csr

This add the key as well –


Finish install:

How to Change the IP for Webmail on Plesk Domain


Webmail shows the blank page or the default plesk page.

DNS records for is managed by external DNS server:

# dig +short @

There is another IP is set in web server configuration file for

RHEL-like systems

grep VirtualHost /etc/httpd/conf/plesk.conf.d/webmails/example.com_webmail.conf | grep -v "/VirtualHost"

Debian-like systems

grep VirtualHost /etc/apache2/plesk.conf.d/webmails/example.com_webmail.conf | grep -v "/VirtualHost"

Both IP addresses belongs to the server

IP address that is set for domain does not match the one specified on registrar’s side.

Log into Plesk
Browse to Home > Domains > > Web Hosting Access and change IP address to the correct one

If the domain has no hosting and used only to serve mail, Web Hosting Access link is not present in Plesk. However, to update IP for webmail’s configuration file is possible via command line:

Connect to the server using SSH
Update the IP address to correct one:

# plesk bin subscription -u -ip


DDos Analysis

DDos Detection Articles:

Import a large sql dump file to a MySQL database from command line

How to import a very large SQL dump file (6 Gb) to a MySQL database using windows command line. If you are using linux it is the same. The process is the following:

Open a command prompt (or shell in Linux) with administrative privilleges

Connect to a mysql instance using command line

# mysql -h --port=3306 -u root -p

if you are in localhost you do not need host and port

# mysql -u root -p

Or if plesk,

# mysql -uadmin -p`cat /etc/psa/.psa.shadow`

You are now in mysql shell. Set network buffer length to a large byte number. The default value may throw errors for such large data files

mysql> set global net_buffer_length=1000000;

Set maximum allowed packet size to a large byte number.The default value may throw errors for such large data files.

mysql> set global max_allowed_packet=1000000000;

Disable foreign key checking to avoid delays,errors and unwanted behaviour

mysql> SET foreign_key_checks = 0;
mysql> SET AUTOCOMMIT = 0;

Import your sql dump file

mysql> use db_name;
mysql> source backup-file.sql;

Remember to enable foreign key checks when procedure is complete!

 mysql> SET foreign_key_checks = 1;
 mysql> SET UNIQUE_CHECKS = 1;
 mysql> SET AUTOCOMMIT = 1;

If you are in Linux you can create a Bash script which will do the dirty job and write to stdout start and end time of import:


  # store start date to a variable

  echo "Import started: OK"

  ddl="set names utf8; "
  ddl="$ddl set global net_buffer_length=1000000;"
  ddl="$ddl set global max_allowed_packet=1000000000; "
  ddl="$ddl SET foreign_key_checks = 0; "
  ddl="$ddl SET UNIQUE_CHECKS = 0; "
  ddl="$ddl SET AUTOCOMMIT = 0; "
  # if your dump file does not create a database, select one
  ddl="$ddl USE jetdb; "
  ddl="$ddl source $dumpfile; "
  ddl="$ddl SET foreign_key_checks = 1; "
  ddl="$ddl SET UNIQUE_CHECKS = 1; "
  ddl="$ddl SET AUTOCOMMIT = 1; "
  ddl="$ddl COMMIT ; "

  echo "Import started: OK"

  time mysql -h -u root -proot -e "$ddl"

  # store end date to a variable

  echo "Start import:$imeron"
  echo "End import:$imeron2"

Other solutions:
Big Dump seems good

Split Files

Using the MutiPHP Editor changes are overwritten for fopen and exec

Recently there was an issue where the fopen and curl function and shell_exec functions were reverting back to original values. Using the MutiPHP Editor was not working.

the resolution was that the php-fmp handler was being used on a cpanel server. So the php-fpm config file needed to be changed.

The line that needs to be edited is:in /opt/cpanel/ea-php56/root/etc/php-fpm.d/$DOMAIN

Remove the disable_functions which includes shell_exec

php_admin_value[disable_functions] =

Then restart the following services.

systemctl restart httpd.service

UPDATE; Seems the yaml files need to be updated:

This information is for editing the yaml file which should result in permanent changes.

More information here on php-fpm configurations:


Also, there was an issue with fopen where the changes in the MultiPHP Editor were being overwritten.

If  PHP handler is LSAPI, you can adjustment to your Apache configuration. Please ensure the setting is enabled for the site(s) in question under MultiPHP Ini Editor. If this still does not work, in whm from   Home »Software »MultiPHP Manager there is a System PHP-FPM Configuration tab and from it you can change the user override ability for allow_url_fopen and other options.


How do I manage databases in the Plesk control panel?

The Plesk Control Panel has the ability to create multiple MySQL and PostgreSQL databases as well as multiple users within each database. Also, directly accessible via Plesk, are the links to phpMyAdmin and PhpPGAdmin, the PHP interface applications that abstract mysql or postgresql into a web-based administration tool, allowing you to sort, edit, and create tables within a given database.

Before creating your databases within the Plesk Control Panel, please ensure that you have already added a hosted domain name to your dedicated server.

Here is how you can create MySQL (or PostgreSQL) databases using Plesk:
Login to your Plesk Control Panel. The login URL is in the following format (https://ipaddress:8443).
Click on Websites and Domains from the navigation bar on the left.

Select the domain name that you’d like to associate your database with.
Click the Databases icon on the top right menu.

Click the Add Database icon.

Add the Database Name
Select the related site for the data base.
Click the “Create a Database User” box in order to setup database administrator’s credentials.
Enter a username and a password which will be used for accessing the contents of the database.
Select if the User has access to all databases.
Select Access Control for the database.
Click OK.
Now, you can use the phpMyAdmin and other tools where you can manage your database.

PHP Custom Sessions Not Working in Plesk

I went and adjusted the expected time out to 4 hours on every domain and on the default settings through Plesk. But it seems that instead of time outs being handled by php, the server runs a cron job that handles the timeouts and ignore php settings. That breaks our apps. Is it there a way to change his?