Archive for June, 2010

How to check if Python script engine is enabled

We can check using the default Parallels Plesk Panel domain page content (http://domain.tld/index.html) - then by the “Python” item.

The test looks successful if a page with a list of environment variables is shown.

Test can be done using a simple script like this.

#!/usr/bin/env python
# -*- coding: UTF-8 -*-

# enable debugging
import cgitb
cgitb.enable()

print “Content-Type: text/plain;charset=utf-8″
print

print “Hello World!”

It is necessary to put the content into a text file and save in the domain web-accessible folder (like $HTTPD_VHOSTS_D/domain.tld/httpdocs) on the server with .py extension (test.py for example). Then try to open the file via browser by the http://domain.tld/test.py URL.

The test looks successful if a page shows the “Hello World!” string. If an error or full script listing is visible, it means that Python engine is not configured for the domain properly.

Reference: http://parallels.com/

Unable to open configuration file /etc/psa/psa.conf: Permission denied

unable to open configuration file /etc/psa/psa.conf: Permission denied

Such errors are reported when Panel spam-filter processes incoming mail to mailbox with the Spamassasin feature enabled. Error is reported because spam-filter hook has no permission to access files in the /etc/psa directory. However, Spamassassin still processes messages correctly so this error does not mean Spamassassin is not working.

To workaround the issue it is possible to add the execute permissions for the /etc/psa folder.

chmod +x /etc/psa

Reference: http://parallels.com/

SBDavid

How can I force fsck on next boot

How can I force fsck on next boot

You can force an automatic full check by changing the check interval using tune2fs (-c and/or -i).

-c max-mount-counts

Adjust the number of mounts after which the filesystem will be checked by e2fsck(8). If max-mount-counts is 0 or -1, the number of times the filesystem is mounted will be disregarded by e2fsck(8) and the kernel.

-i interval-between-checks[d|m|w]

Adjust the maximal time between two filesystem checks. No postfix or d result in days, m in months, and w in weeks. A value of zero will disable the time-dependent checking.

It is strongly recommended that either -c (mount-count-dependent) or -i (time-dependent) checking be enabled to force periodic full e2fsck(8) checking of the filesystem.

# tune2fs -c 1 /dev/hda2

The above command would tell the init scripts to run fsck on hda2 at every boot.

# tune2fs -i 1d /dev/hda2

The above command would tell the init scripts to run fsck on hda2 after 1 day.

If you only want to run fsck on the next boot, please execute the following as the root user.

# cd /
# touch forcefsck

This will only run the file system check on the next reboot. By touching the file “forcefsck” in the / directory, it will force the system to perform a full file system check.

The file “forcefsck” will be deleted automatically after fsck is finished.

How do I install flash plugin for Firefox in RHEL

The easiest way to download and install the flash plugins to your Red Hat Enterprise Linux system would be to run the following command.

Red Hat Enterprise Linux 5

yum install flash-plugin

Ports need to be opened for Plesk services

Generally it depends on what services are running on the server. All the default ports which can be used by Plesk/services are listed below:

#20 ftp-data
#21 ftp
#22 ssh
#25 smtp
#53 dns (TCP and UDP)
#80 http (web server and Plesk updater)
#106 poppassd (for localhost only)
#110 pop3
#113 auth
#143 imap
#443 https
#465 smtps
#587 mail message submission
#990 ftps
#993 imaps
#995 pop3s
#3306 mysql
#5224 (outgoing connections only) plesk-license-update
#5432 postgres
#8443 plesk-https
#8880 plesk-http
#9080 tomcat

If required you can always reset your default firewall settings via the AccountCenter.

Reference: http://parallels.com/

« Prev - Next »