Plesk: componentUpdate failed: Unable to exec utility packagemng

April 17, 2011    |   Posted by admin   |    Category: Plesk Management

You may see an “Unable to exec utility packagemng” error message while accessing the Plesk control panel. The error generally occurs after performing a Plesk control panel upgrade and the complete error message looks like follows:

Components::componentUpdate() failed: Unable to exec utility 
packagemng: file does not exist or is not executable:
/usr/local/psa/admin/bin/packagemng 0: auth.php3:551

This is due to the “packagemng” file is symlinked to the “wrapper” file and the ‘wrapper’ file don’t have the executable permissions for it’s group user “psaadm”.

The permissions of ‘packagemng’ file are (symlink):

# ls -la /usr/local/psa/admin/bin/packagemng
lrwxrwxrwx 1 psaadm psaadm Jan 01 packagemng  -> ../sbin/wrapper

In my case the permissions of wrapper file were ( there was no executable permission)

# ls -la /usr/local/psa/admin/sbin/wrapper 
---s------ 1 root psaadm Jan 01 /usr/local/psa/admin/sbin/wrapper

The correct permissions of the wrapper files are ( —s–x— ) which can be set using the following command:

# chmod 4110 /usr/local/psa/admin/sbin/wrapper

so it should look like

---s--x--- 1 root psaadm 19760 Jan 01 05:20 wrapper

Once done, you should be able to access the Plesk control panel.

4110

Unable to unsuspend a domain in Plesk

April 9, 2011    |   Posted by admin   |    Category: Plesk Management

If you perform a Plesk upgrade, you may notice you are unable to unsuspend a domain from the Plesk control panel resulting in the following message:

Warning: The domain is still suspended for the following reason: 
Domain is temporarily suspended for backing up or restoring.

Looking at the message, it appears that a backup process is running for the domain on the Plesk server but it is not, thus making things look complicated. In such a case, unsuspend the domain on the Plesk server from shell.

SSH to the server as root and execute:

# /usr/local/psa/bin/domain -u domain.tld -status enabled

This will un-suspend/enable the domain.

Sometimes a “Segmentation fault” message appears while unsuspending the domain via SSH. It indicates that the Plesk upgrade didn’t go through successfully and there is a problem with plesk binaries. You now need to install the Plesk base packages again from Plesk –> Updates, section.

Once the update is performed, reconfigure the domain:

# /usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost \
 --vhost-name=domain.tld

and enable it

# /usr/local/psa/bin/domain -u domain.tld -status enabled

This will un-suspend the domain and will leave you with a message “Object successfully enabled”.

How to enable allow_url_fopen for a single domain on a cPanel server?

March 26, 2011    |   Posted by admin   |    Category: cPanel Management

The way to enable allow_url_fopen on a phpsuexec and a non-phpsuexec server is different. To enable allow_url_fopen server wide is a security risk, however, you can turn it ON for a single domain incase it is required.

Here how it needs to be done.

  • On a non phpsuexec server:

Goto the /usr/local/apache/conf/ directory,

# cd /usr/local/apache/conf/userdata

create a ‘userdata’ directory if not there and then create a directory with the accounts username inside it. Finally, you have to create a file allowurl.conf in the newly created directory.

The complete path should look like:

# pico /usr/local/apache/conf/userdata/<username>/allowurl.conf

and add the following to the file

<IfModule mod_php5.c>  
php_admin_value allow_url_fopen On 
php_admin_value allow_url_include On 
</IfModule> 

Now, edit the Apache configuration file and scroll down to the VirtualHost entry of the domain. Include the path of the above created file in it, as shown below:

Include "/usr/local/apache/conf/userdata/<username>/allowurl.conf"

Save the file and rebuild the apache configuration

# /usr/local/cpanel/bin/apache_conf_distiller --update 
# /usr/local/cpanel/bin/build_apache_conf 
# /scripts/restartsrv httpd

This will enable allow_url_fopen for that domain.

  • On a PhpSuExec Or SuPHP server:

To enable allow_url_fopen on a SuPHP/PHPSuExec enabled server, copy the server side php.ini OR create a new one under the public_html directory of the domain (OR in the directory where you want to enable allow_url_fopen) i.e.

# cp /usr/local/lib/php.ini /home/<username>/public_html/

and edit the new php.ini to enable allow_url_fopen directive:

allow_url_fopen = On

Save the file and this is it.

BTW, replace “<username>” with the actual username of the domain wherever stated above.

Comments Off on How to enable allow_url_fopen for a single domain on a cPanel server?

How to assign a dedicated IP to a Sub-domain OR Add-on/Park domain?

March 8, 2011    |   Posted by admin   |    Category: cPanel Management

By default, cPanel allows one IP per account, however, in case you wish to assign multiple IPs to an account, say for a sub-domain, you can do so by editing a few files. Follow the below steps:

1) The main configuration file of a domain is stored under the /var/cpanel/userdata/<username>/ directory, so edit the subdomain related file under it

# vi /var/cpanel/userdata/<username>/subdomain.domain.tld

Change the value of “IP” to a dedicated IP and save the file. The add-on and Park domains have their related subdomain files in the same directory.

2) Now, rebuild the Apache configuration for the changes to take affect in the respective VirtualHost entry

# /scripts/rebuildhttpdconf 

3) Restart the Apache webserver

# service httpd restart

4) Add the dedicated IP and sub-domain in the /etc/domainips file to mark the dedicated IP as assigned so WHM won’t be able to assign it to other domains.

dedicatedIP: subdomain.domain.tld

Save the file and rebuild the IP pool

# /scripts/rebuildippool

5) Now, edit the DNS zone file of the main domain (i.e. the domain under which the sub-domain is created) and add an ‘A’ record for the sub-domain to point to the new IP.

# vi /var/named/domain.tld.db

Save the file and restart the ‘named’ service

# service named restart

Allow sometime for the new IP to propagate.

Note: Rebuilding the IP pool will still list the IP as free under the WHM -> IP Function -> ‘Show IP Address Usage’, however WHM wont allow you to assign that IP to another domain.

Comments Off on How to assign a dedicated IP to a Sub-domain OR Add-on/Park domain?

configure error: Ogg needed! Ogg not found

February 27, 2011    |   Posted by admin   |    Category: Linux Administration

You may receive the “configure: error: Ogg needed” while installing libogg which indicates some missing devel packages related to Ogg. The complete error message is as follows:

Could not run Ogg test program, checking why... 
The test program compiled, but did not run. 
This usually means that the run-time linker is not finding Ogg 
or finding the wrong version of Ogg. configure: error: Ogg needed!

This requires the installation of libogg and libvorbis devel package which is available with yum. SSH to the server as root and install the packages

# yum install libogg-devel libvorbis libvorbis-devel

Once done, you will be able to install libogg package.

Comments Off on configure error: Ogg needed! Ogg not found