Plesk control panel issue and solution

Plesk Notes

Plesk Login and password from psa:

# mysql -u admin -p`cat /etc/psa/.psa.shadow`
mysql> use psa;
mysql> select * from clients where pname=’Client Name’;
select * from accounts where id=’3245′;

To find the password of an email account

# mysql -u admin -p`cat /etc/psa/.psa.shadow`
# use psa;

# select * from domains where name=’domainname’;

—> will get like given below.
| 181 | 2005-09-22 | domainname

# select * from mail where dom_id=’181′;
—> will get like given below.
| 265 | domainname | true | 784 | false | | false | false | false | any | -1 | 181 | 392 |

# select * from accounts where id=’784′;

To find the ftp password

# mysql -u admin -p`cat /etc/psa/.psa.shadow`
# use psa;
# select * from sys_users where home=’/home/httpd/vhosts/domainname’;
# select * from accounts where id =’712′;

Additional ftp account

FTP log in Plesk


How do I upgrade Plesk

How to setup a new server

updater Icon missing in Plesk

RPM is located at the …/opt/updater directory in the Plesk distributive.

Plesk error ERROR: PleskFatalException

rm -rf /var/lib/rpm/__db.00*

Apache failed to start with the “No space left on device” error

These errors mean that there is no available IPC (inter-process communication) resources in the system, such as
semaphores or shared memory segments.

Script to delete semaphore process

ipcs -s | grep apache | perl -e ‘while () {@a=split(/\s+/); print `ipcrm sem $a[1]`}’
ipcs -s|grep apache|awk ‘{print $2}’|while read i; do ipcrm -s $i;done

webmail error “A fatal error has occurred DB Error: connect failed”

To find the history of load on a server

sar -q

How can we add the settings so as to access in Plesk

Create A record or CNAME record for the subdomain in DNS and add the following line in the file given below.


Reconfigure the domain and restart named and apache.

Reconfigure Domain:

/usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –

Run stat

/usr/local/psa/admin/sbin/statistics –calculate-one –domain-name=domainname

Fixing awstats after a Plesk 8.3 migration

cd /root
tar -xzf fixstats.tar.gz

Please note to change the directory path in as /home/httpd/vhosts or /var/www/vhosts . By default the script is set to /var/www/vhosts

# ./
fixstats v1.2
Usage: ./ [–all | –domain= | –verbose | –test | –help]

–all : Run statistics on all domains. May not be used in conjunction with –domain.
–domain : Run statistics on specified domain only. May not be used in conjunction with –all.
–verbose : Verbose mode. Displays domains as they are processed.
–test : Test mode. Does everything except call awstats. For debugging purposes mostly.
–help : This message.

Enable Full Country list is awstats

vi /usr/local/psa/etc/awstats/
uncomment the line LoadPlugin=”geoipfree”
Rerun the stats for the domain

How to change the mail server ip

/sbin/iptables -t nat -A POSTROUTING -p tcp –dport 25 -j SNAT –to-source

path to email accounts


Mail queue

command to see mails in queue:

command to find the number of mails in a queue:

Clean Mail queue

Download qmail-remove tool from here

qmail-remove -r -p “Online Banking” -i -v
qmail-remove -r -p mailer-daemon -i -v
qmail-remove -r -p bouncing -i -v

You can use third party programs like qmail-remove to accomplish queue management in plesk control panel managed qmail

The Plesk control panel itself provides a modified version od qmHandle ( )along with it that can be used with ease to manage the queue

To see the statistics of the queue:

/usr/local/psa/admin/bin/mailqueuemng -s
Messages in local queue: 0
Messages in remote queue: 0
Messages in todo queue: 0
Messages total: 0
Messages found: 0
Timestamp: 1215870834

From this you can see the status of qmails local,remote and todo list

If you wish to do a delivery of the queued messages now run the following command

/usr/local/psa/admin/bin/mailqueuemng -a

To list remote message queue:
/usr/local/psa/admin/bin/mailqueuemng -R

list local message queue:

/usr/local/psa/admin/bin/mailqueuemng -L

To delete messages with a particular pattern in the subject line

/usr/local/psa/admin/bin/mailqueuemng -S”text”

To delete all messages in the queue (Use with caution – possible data loss )

/usr/local/psa/admin/bin/mailqueuemng -D

To disable reverse lookups in qmail with Plesk, simply add -Rt0 to the server_args line in /etc/xinetd.d/smtp_psa

The server is overloaded with SPAM. There are many messages in queue. Mail is delivered slowly

Many email messages are sent from PHP scripts on the server. How can I find what domains these scripts are running on – qmail wrapper

SMTP on different Port in Plesk

a) add the following to /etc/services
smtp-26 26/tcp mail

b) Copy /etc/xinetd.d/smtp_psa to /etc/xinetd.d/smtp_psa-26
c) Change the first line from service smtp to service smtp-26
d) Restart xinetd

How to avoid reverse dns lookup in mail

hard disk quota is not supported

Add ‘usrquota’ to the options in fstab for home partition.
mount -o remount /home
then just ran:
quotaoff -av
quotacheck -avum
quotaon -av

Named error while starting

1) cd /var/named/run-root/etc
2) mv named.conf named.conf.bak
3) cp named.conf.default named.conf
4) for x in `ls`; do /usr/local/psa/admin/sbin/dnsmng update $x; done;/etc/init.d/named restart

Some clients experience a 30-60 second delay when trying to send/receive mail with Plesk mail server.

Plesk backup

Backup convert

/usr/local/psa/bin/backup-convert convert -o output_file_name backup_name

Mail wrapper

Qmail faq

Maintaining your qmail server

queuelifetime – The “queuelifetime” setting for qmail determines how long messages can stay in the queue. By
default, your qmail server will keep messages in the queue for 604,800 seconds, or 7 days. However, you can set a
custom queuelifetime by creating a file called /var/qmail/control/queuelifetime. The content of that file is a
single line containing a number which represents the number of seconds the queue will hold any given message. If
you want to set a custom queuelifetime, you might want to whip out the old calculator.

Squirrelmail 1.4.11 attachment issue


Then from the root of the SquirrelMail directory (/usr/share/psa-horde/sqmail) (where src, class, etc can be seen),

patch -p0 domain name > Certificates and click Add New Certificate.
2. Specify the certificate properties:
* Certificate name. This will help you identify this certificate in the repository.
* Encryption level. Choose the encryption level of your SSL certificate. We recommend that you choose a
value more than 1024 bit.
* Specify your location and organization name. The values you enter should not exceed the length of 64
* Specify the domain name for which you wish to generate an SSL certificate. For example:
* Enter the domain owner’s e-mail address.
1. Click Self-Signed. Your certificate will be generated and stored in the repository.
3. Return to the domain’s administration screen (Domain > domain name) and click Setup in the Hosting group.
4. Select the self-signed SSL certificate from the Certificate drop-down box.

If there is no Certificate drop-down box on the screen, this means that you are on a shared hosting account;
therefore, you need to upgrade your hosting package and purchase a dedicated IP address from your hosting provider.
5. Select the SSL support check box and click OK.

Info] Directory for files browsed via HTTPS(SSL)

Since Plesk 7 for Windows does not use httpsdocs directory, the files should be uploaded to httpdocs and they will
be accessible via both HTTP and HTTPS protocols.

Starting with Plesk 7.5, the ‘httpsdocs’ directory is used for ‘Shared SSL’ feature only

Custom error docs

For enabling this feacture you have to check the option “Custom Error Documents” in domain >> setup


Plesk Frontpage issue:∞

“Access Denied” error when trying to log into Plesk

If you get a “Access Denied” error when trying to log into Plesk, it means that you are currently locked out because of too many bad login attempts. To resolve this issue do the following:

1. Log into the psa database.

mysql -uadmin -p$(cat /etc/psa/.psa.shadow) psa

2. All user sessions are stored in the table ‘lockout’ in the psa database. To unlock all users in this table delete the user’s entry from this table using the following query:

delete from lockout;

Changing the page title for the login screen

You can change the title for the control panel login screen.

cd /usr/local/psa/admin/htdocs/javascript
cp common.js common.js.back

open common.js and at the top of the page add this:

document.title = ‘**ENETER THE TEXT HERE**’;

How to reset Plesk admin Password

Linux Server :

Login to Linux server as root, and run following commands :

cd /usr/local/psa/admin/bin
export PSA_PASSWORD=’newpassword’
cat /etc/psa/.psa.shadow

Windows Server : Login to windows server via RDP as a administrator, then open command prompt and run following commands :

C:\Program Files\SWsoft\Plesk\admin\bin\plesksrvclient.exe (according to plesk location)


cd %plesk_dir%
cd admin\bin

Execute this “plesksrvclient.exe”, you will be prompted to enter the new password for your “admin” plesk user.

You can then log into the plesk interface again and use as normal.

Script to find vulnerable files in a server

cd /usr/src
bash script

Open file /root/hacks_details.txt and you will get all the details

Frame redirects

URL Redirect

How to check whether mod_rewrite is enabled on a server


place the following lines in your .htaccess: Code:

Options +FollowSymLinks
Redirect /joomla.html

note: if your site is located in subdomain example “test” you need to insert in .htaccess as: Code:

Options +FollowSymLinks
Redirect /test/joomla.html

Now point your browser to:

If it redirects you to – mod_rewrite is working. If it gives you an error – mod_rewrite is not working.

Mamboo Installation issue in plesk 8.1.1


When you log in to control panel, it can open in either a standard view, a simplified desktop view, or a combination of both.

The standard view is a customary view of the control panel divided into two main areas: navigation pane on the left and the main screen where operations are performed on the right.

The desktop view can show server statistics and shortcuts to the operations you frequently perform everything you may need can now be accessible from a single screen.

You can set the option through plesk admin login and the following steps will help you to select which type of interface to be used for accounts which are using a particular template.

Clients > Client templates > Click on the template to edit >> select the option “Only standard interface is
allowed” or ” Desktop and standard interface are allowed” or “Only Desktop interface is allowed”.

The following url will help in changing the interface of each accounts.


Enabling server-status

SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from


ExtendedStatus On

Error : command not in docroot in /etc/httpd/logs/suexec.log for .cgi files

cp -p /usr/local/psa/suexec/psa-suexec /usr/sbin/suexec

Error “Symbolic link not allowed”

Check open_basedir restriction and give the following in .htaccess file

Options Indexes FollowSymLinks

Redirection Rule

Need to redirect all request to to

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.domain\.com
RewriteRule ^(.*)$$1 [R=301,L]

Installing eaccelerator

tar -xvzf eaccelerator-
tar -xvjf eaccelerator-
cd eaccelerator-
./configure –enable-eaccelerator=shared
make install
edit the file /etc/php.d/eaccelerator.ini
mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator
/etc/init.d/httpd stop
/etc/init.d/httpd start

Upgrading ioncube loader ———– download the latest version ———– steps

Download the latest version to some directory(htdocs). Copy the appropiate file ( to the
ioncube folder (normally /usr/local/ioncube). You can get the path from php.ini file (zend_extension =
/usr/local/ioncube/ Edit the above line in php.ini according to the version. Goto
http://servername/ioncube-loader-helper.php (where you downloaded the ioncube source file) and you will see as

An ionCube encoded file has been loaded successfully.
Encoded files should now function correctly.

Get the following error when try to use PHPMyAdmin in the Plesk CP: “#1045 – Access denied for user ‘pma_xxxxxxx’@’localhost’ (using password: YES)”

path to config.default.php is /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries and the path to is /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin . Then give necessary privileges

Plesk Error : Unable to connect to database: get_admin_password() failed: file_get_contents() failed: 0: /usr/local/psa/admin/auto_prepend/auth.php3:1 psaerror(string “Unable to connect to database: get_admin_password() failed: file_get_contents() failed: “)

Make sure that “/etc/psa/.psa.shadow” file has a valid permissions.
Right permissions should be as follows
-rw——- 1 psaadm psaadm 5 Feb 26 11:22 /etc/psa/.psa.shadow

Script to get mail password given a domain name:

#Author Anoop Alias

psapass=`cat /etc/psa/.psa.shadow`
echo “Please Enter Mailname:”
read mailname
echo $mailname >/tmp/mailname
domain=`cut -d@ -f2 /tmp/mailname`
user=`cut -d@ -f1 /tmp/mailname`

echo “use psa;select id from domains where name=’gnusys’;” >/tmp/query1
sed -i s/gnusys/$domain/ /tmp/query1
id=`mysql -uadmin -p$psapass /tmp/query1
sed -i s/gnusys/$id/ /tmp/query1
sed -i s/idiot/$user/ /tmp/query1

id=`mysql -uadmin -p$psapass /tmp/query1
sed -i s/gnusys/$id/ /tmp/query1
mysql -uadmin -p$psapass Preferences.
It was implemented to avoid too many apache restarts if a lot of operations are done in Plesk CP. It doesn’t mean
that apache will be restarted every time of this period. If no one makes changes in Plesk CP then apache will not
be restarted, but if someone does, apache will be restarted not more often than once in the apache restart

Error make_sock: problem listening on port 443, file descriptor (1068) larger than FD_SETSIZE (1024)

Unable to open logs

Too many open files

Do I need a new Certificate Signing Request (CSR) generated to renew a certificate?

In most situations you will not require to generate a new Certificate Signing Request (CSR) to renew an SSL
certificate because you can simply use the one we generated for you when you first purchased the certificate.
However, we are finding that many SSL certificate issuers are now requesting that a new CSR be generated for each
renewal. The reason that many certificate issuers will ask you to generate a new key pair and CSR to request a
certificate renewal is because by renewing your public key along with the certificate you help to protect against
the risk of the cryptographic key being compromised by a sustained computational attack over many years and
maintain improved security for your transactions. You should check with your specific SSL certificate issuer to
find out what their policy is with regards to renewals.

how to exclude an ip recording in webalizer

plesk>Reports>Webstats Preferencies>Hide Refferer

How to setup ssl for subdomain in plesk

URL to unblock ip that are blocked at hotmail…&ct=eformts

Error “1054 – Unknown column ‘p.products_id’ in ‘on clause’”

Error “1054 – Unknown column ‘a.authors_id’ in ‘on clause’”


To enable http://IP/~username in plesk use the following in httpd.conf

# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
# UserDir enable
# To enable requests to /~user/ to serve the user’s public_html
# directory, remove the “UserDir disable” line above, and uncomment
# the following line instead:
UserDir httpdocs

How do I enable cgi-scripts to run from httpdocs and httpsdocs directories

FTP not working….. Connection closed by foreign host


Error “Error: This alias already exists” while creating domain

use psa;
select * from domainaliases where name=’’;
delete from domainaliases where name=’’;
select * from `dns_recs` where displayHost like ‘’;
delete from `dns_recs` where displayHost like ‘’;

Follow the steps given below if you still have issue

select * from dns_zone where displayName like ‘’;
delete from dns_zone where displayName like ‘’;
Then delete the named db file

Leave a comment

Leave your opinion

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: