Error with restarting SSHD in WHM

Issue

Error with restarting SSHD in WHM. Verified the error, but SSHD appears to restart and take changes anyways even though the error is reported by WHM. Restarted SSHD from SSH does not show any errors and there is nothing in the logs about any errors with SSHD.

Fix

The issue here is that SSH is running on a non-standard port (3333). WHM/Cpanel doesn’t support non-standard ports in WHM.

Categories WHM

Export/Import Mysql Database

Export a database mysql


# mysqldump -u -p username database_name > dbname.sql

Plesk Server


# mysqldump  -u admin -p`cat /etc/psa/.psa.shadow` wordpress_database > domain_backup_7.16.14.sql

To export a single table from your database you would use the following command:


# mysqldump -p --user=username database_name tableName > tableName.sql

Import a database or table


# mysql -p -u username database_name < file.sql 

For Plesk server


# mysql -u admin -p`cat /etc/psa/.psa.shadow` database < /tmp/database.sql

To import a single table into an existing database you would use the following command:


#mysql -u username -p -D database_name < tableName.sql

Cron Job not working in Plesk Domain

Check you cron job. Make sure the path are okay.

This is likely due to Plesk using a chrooted environment. The user that is executing the script doesn’t have access to PHP. You have a few options:

1. Add PHP to the user’s chroot – http://kb.sp.parallels.com/en/115842
2. Disable the chrooted environment entirely – http://blog.blums.eu/2013/01/25/parallels-plesk-panel-11-non-chrooted-cronjobs
3. Run the script as root because root does have access to PHP (not recommended but if the script is trusted it might be ok).

Find All The Files Owned By a Particular User / Group

Find file owned by a group

find directory-location -group {group-name} -name {file-name}

directory-location : directory path.
-group {group-name} : group-name.
-name {file-name} : The file name or a search pattern

Issue: Plesk server will not allow updating plugins and the site is running as fastcgi – which uses the ftp user as the root user ( coldriverw:psacln) is the user:group for this account.

In this example, locate or find all files belongs to a group called “apache” in the /var/www/vhosts/coldriverdata.com/httpdocs/ directory:


[root@austin plugins]# find /var/www/vhosts/domain.com/httpdocs/ -group apache
/var/www/vhosts/domain.com/httpdocs/.htaccess
/var/www/vhosts/domain.com/httpdocs/wp-content/plugins/enhanced-tooltipglossary
/var/www/vhosts/domain.com/httpdocs/wp-content/plugins/enhanced-tooltipglossary/readme.txt

Change the files to the correct user:

 [root@austin plugins]# chown -R domain:psacln /var/www/vhosts/domain.com/httpdocs/wp-content

Retry the wordpress upload

Update Plugin
Downloading update from https://downloads.wordpress.org/plugin/enhanced-tooltipglossary.zip…

Unpacking the update…

Installing the latest version…

Removing the old version of the plugin…

Plugin updated successfully.

More information:
http://www.cyberciti.biz/faq/how-do-i-find-all-the-files-owned-by-a-particular-user-or-group/