Skip to content

Plesk tips&tricks

by admin on March 21st, 2009

Plesk Logs



mail/ftp xfer



I have included below the instructions for adding system FTP user account’s. First you will need to add the user, to do so simply issue the following command(s) as root:

 useradd -s /bin/false johndoe -d /home/johndoe

The “-s /bin/false” portion ensures this user can only ftp into the system and has no shell access. The “-d /home/johndoe” portion indicates that this users home directory should /home/johndoe. If you also want to restrict “johndoe” to his directory you should use the following command below instead:

 useradd -s /bin/false -G psacln johndoe -d /home/johndoe

The “-G psacln” switch automatically add’s the johndoe user to the psacln group, any user account’s that are part of that group automatically get restricted to their home directory.

After adding the user you simply need to setup a password for them using the following command:

 passwd johndoe


qmail turn off reverse lookups.

 -Rt0 flag the to the beginning of the server_args line in the /etc/xinet.d/smtp_psa

Install new Plesk license

download correct license from

 /etc/init.d/psa stop
 mysql -u admin -p`cat /etc/psa/.psa.shadow` psa
 mysql> truncate key_history;
 mysql> truncate key_history_params;
 mysql> exit
 rpm -e --nodeps psa-key-custom
 rpm -Uvh plesk7.5_100_spamassassin  (or correct license)
 /etc/init.d/psa start

Qmail voodoo: (where spamblackhole is the domain or subject)

 /var/qmail/bin/qmail-qread | grep -B1  spamblackhole |grep GMT | awk '{print $6}'   | sed s/^#/-d/ > /home/rack/delete

Plesk FrontPage fixup: (from httpdocs dir)

disable frontpage in plesk

 find . -name .htaccess -type f | xargs rm -rf
 find . -name '_vti*' -type d | xargs rm -rf
 find . -name '_private' -type d | xargs rm -rf

enable and reset password in plesk

Change TTLs in Plesk

update the misc table to the value:

 update misc set val='86400' where param='SOA_TTL';

update the zone records:

 mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e 'select name from domains' | 
 awk '{print  /usr/local/psa/admin/sbin/dnsmng update " $1 }' | sh

Plesk user passwords

 select,,mail.mail_name,accounts.password from domains,mail,accounts where and and accounts.password='password';

Plesk FTP users

 mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "SELECT, sys_users.login, accounts.password FROM
 hosting, domains, sys_users, accounts WHERE hosting.dom_id = AND hosting.sys_user_id = AND
 sys_users.account_id = ORDER BY;"

Upgrade to PHP5 on Plesk 8.1

 rpm -e `rpm -qa | grep -i sitebuilder`
 rpm -e php-sqlite2 sb-publish
 rpm -e PPWSE
 rpm -e --nodeps php-domxml
 rpm -Uvh *.rpm

 up2date --configure

Plesk mail mchk

 /usr/local/psa/admin/bin/mchk -v
 /usr/local/psa/admin/bin/mchk -v --with-spam

Kill Qmail queue

 # remove everything - STOP QMAIL FIRST!
 /sbin/service qmail stop
 for i in bounce info intd local mess remote todo;
 do find /var/qmail/queue/$i -type f -exec rm {} \;
 /sbin/service qmail start

Plesk5 websrvmng (sort of)

 /usr/local/psa/admin/bin/my_apci_rst -v

Plesk UserDirs in 8+

Just create the file /etc/httpd/conf.d/userdir.conf and add in the following contents:

 <VirtualHost  the.primar.ip.address:80>
 ServerName default
 UseCanonicalName Off
 DocumentRoot /var/www/vhosts/default/htdocs
 UserDir httpdocs
 ScriptAlias /cgi-bin/ "/var/www/vhosts/default/cgi-bin/"
 <Directory "/var/www/vhosts/">
        <IfModule sapi_apache2.c>
                php_admin_flag engine on
        Options +Includes +ExecCGI
 <Directory "/home/httpd/vhosts/">
        <IfModule sapi_apache2.c>
                php_admin_flag engine on
                Options +Includes +ExecCGI

More fun with qmail

 /var/qmail/bin/qmail-qread | grep "[email protected]" | awk '{print $6}' | sed 's/^/-d/g' | 
 sed 's/#//g' > /home/rack/

then just:

 qmHandle `cat`

Plesk SPAM link

Add spell checking to Horde

You need to ADD the following line to

 $conf['utils']['spellchecker'] = 'aspell';

Lower TTLs in Plesk

 insert into misc values ('soa_TTL','300');
 mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e 'select name from domains' | 
 awk '{print "/usr/local/psa/admin/sbin/dnsmng update " $1 }' | sh
One Comment
  1. Nice Information! I personally really appreciate your article. This is a great website. I will make sure that I stop back again!.

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS