So – you migrated some file to a plesk/cpanel server and the ownership is wrong. Here is how to change it.
Plesk

[root@austin httpdocs]# cd /var/www/vhosts/domain.com/httpdocs/
[root@austin httpdocs]# chown -R  user:group *

cPanel

[root@austin httpdocs]# cd /home/user/public_html/
[root@austin httpdocs]# chown -R  user:group *

Or

Plesk

[root@austin httpdocs]# chown -R  user:group /var/www/vhosts/domain.com/httpdocs/*

cPanel

[root@austin httpdocs]# chown -R  user:group /home/user/public_html/*

How do you move a site from one plesk domian to another on the same server?

The ftp and export method.

Get your data.

1. Ftp to the old site and download the files to your local computer.
2. Login to the plesk panel and go to Manage Hosting for the old domain. Go to Websites and Domains. Go to databases. Click on the database name. Click Webadmin. Click Export Tab. Click Custom. make sure all the databases tables are selected (blue). Click Go. This should produce a popup so you can save the file locally.

New Domain.

1. Login to pelsk and click subscriptions. Click Add New Subscription. Fill out the details (make note of the new username and password) and and click okay.
2. ftp to the new domain and upload the files from the old domain.
3. Go to Manage Hosting for the new domain. Go to Websites and Domains. Go to databases. Click add new database. Click on the database name after creation and add a new database user. Click on Webadmin and go to the import tab. Locate the file for the database download and upload. You should see all the tables at this point.
4. Locate the database config file in the new database and edit it with the new database name, user and password.

Servers popping up that are having php failures or issues with php_admin_value or php_admin_flag when apache restarts. This is occurring on servers running PHP 5.3.26. It appears when this update was pushed out, mod_php is no longer being loaded by default.

The symptoms are outlined here:

http://forum.parallels.com/showthread.php?287767-SOLVED-Latest-php-5-3-26-yum-update-from-art-breaks-apache
https://www.atomicorp.com/forum/viewtopic.php?f=12&t=6891&sid=a2317265ae0523eb9273d9d6001f10ed

You should be able to add the following to the top of php.conf file to resolve the issue:


<IfModule prefork.c>
  LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
  LoadModule php5_module modules/libphp5-zts.so
</IfModule>

Also…

If you come across a managed server that has the atomic repo enabled and has updated to PHP 5.4.x it more than likely killed their sites.

If this is the case and they were on a newer version of 5.3.x from atomic I’ve got the couple of one liners that I used to remove all the install PHP packages and then install the webtatic repo (which installed disabled) and then to install a base set of php modules from their repo.

This command will figure out what php-5.4.x packages are installed from atomic. Just to verify that you won’t be killing off anything other than the offending atomic packages.


rpm -qa | grep php | grep 5.4

This one-liner will remove all packages that match the above criteria even if they refer to multiple packages or are listed more than once.


for i in `rpm -qa | grep php | grep 5.4` ; do rpm -ev --allmatches --nodeps $i; done

Once they are all removed install the webtatic repo


rpm -Uvh http://mirror.webtatic.com/yum/centos/5/latest.rpm

Then you can install the basic set of packages for php 5.3


yum --enablerepo=webtatic install php php-devel php-mysql php-imap php-xml php-pdo php-gd php-soap

If you connect to the server via SSH and run the command:


ps afwux

php

[root@austin ~]# ps afwux | grep php
root       998  0.0  0.3 335940 25100 ?        Ss   Jun18   1:10 /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/bin/modules/watchdog/wdcollect -c /usr/local/psa/etc/modules/watchdog/wdcollect.inc.php
root     19926  0.0  0.0 103244   848 pts/0    S+   14:39   0:00          _ grep php
10016    23321  0.0  0.1 257956 10956 ?        S    Jul01   0:00 /usr/bin/php-cgi -c /var/www/vhosts/system/coldriverdata.com/etc/php.ini
10016    19924  0.5  0.7 275928 57464 ?        SN   14:39   0:00  |   _ /usr/bin/php-cgi -c /var/www/vhosts/system/coldriverdata.com/etc/php.ini

Plesk server using resources – process is pigz. This is a process used like gzip or zip and is part of the backup process.
http://download1.parallels.com/Plesk/PP11/11.5/release-notes/parallels-plesk-panel-11.5-impacts-for-linux-based-os.html

Compression with pigz

Panel now uses the pigz library instead of gzip to compress backup data. This ensures better CPU utilization and speeds up the compression 3.5 times on a physical server and 1.2 times on a virtual server (depending on the disk I/O).

See more: https://support.plesk.com/hc/en-us/articles/213366009-High-CPU-wait-I-O-and-Load-Average-during-backup

Duplicated Data Removed

Duplicated data is removed from server.xml: Now top-level XML nodes do not contain information about child nodes.

Connection Speed

Now you can see the estimated connection speed between the source and destination servers during data transfer.

Storing Backup Files

You can set the path for storing a temporary backup file, which is created when a customer downloads a backup from the server.

RE: http://kb.parallels.com/en/114845

[stextbox id=”info”]Symptoms: Many email messages are sent from PHP scripts on the server. How can I find the domains on which these scripts are running if I am using Postfix?[/stextbox]

[stextbox id=”warning”]Note:  This article is for Postfix.  If you are using the Qmail mail server, see this: http://geekdecoder.com/troubleshoot-qmail-spam/[/stextbox]

Resolution

Many email messages are sent from PHP scripts on the server. How can I find the domains on which these scripts are running?

There is a way to determine from which folder the PHP script that sends mail was run.

Note: Depending on your OS and Parallels Plesk Panel (Plesk) version, the paths can slightly differ from those listed below.

Create a /usr/sbin/sendmail.postfix-wrapper script with the following content:

Create a file and open it for editing:

#touch /usr/sbin/sendmail.postfix-wrapper
#vi /usr/sbin/sendmail.postfix-wrapper

Add the following content:

#!/bin/sh
(echo X-Additional-Header: $PWD ;cat) | tee -a /var/tmp/mail.send|/usr/sbin/sendmail.postfix-bin "$@"

Note that this should be two lines, including #!/bin/sh.

Create a log file, /var/tmp/mail.send, and grant it a+rw rights. Make the wrapper executable, rename the old sendmail, and link it to the new wrapper. Then run the commands below:

~# touch /var/tmp/mail.send
~# chmod a+rw /var/tmp/mail.send
~# chmod a+x /usr/sbin/sendmail.postfix-wrapper
~# mv /usr/sbin/sendmail.postfix /usr/sbin/sendmail.postfix-bin
~# ln -s /usr/sbin/sendmail.postfix-wrapper /usr/sbin/sendmail.postfix

Wait for an hour and change the sendmail back:

~# rm -f /usr/sbin/sendmail.postfix
~# mv /usr/sbin/sendmail.postfix-bin /usr/sbin/sendmail.postfix

Check the /var/tmp/mail.send file. There should be lines starting with X-Additional-Header: pointing to the domain folders where the scripts that sent the mail are located.

You can see all the folders from which mail PHP scripts were run with the following command:

~# grep X-Additional /var/tmp/mail.send | grep `cat /etc/psa/psa.conf | grep HTTPD_VHOSTS_D | sed -e 's/HTTPD_VHOSTS_D//' `

[stextbox id=”alert”]NOTE: If you see no output from the above command, it means that no mail was sent using the PHP mail() function from the Parallels Plesk Panel virtual hosts directory.[/stextbox]

Usually, that means one of the mail accounts has been compromised. Check login attempt count:

# zgrep -c 'sasl_method=LOGIN' /usr/local/psa/var/log/maillog*
/usr/local/psa/var/log/maillog:221000
/usr/local/psa/var/log/maillog.processed:362327
/usr/local/psa/var/log/maillog.processed.1.gz:308956

If you see an unusually high number of login attempts, it is very likely that accounts were compromised. You can try to identify these accounts in the following way:

# zgrep 'sasl_method=LOGIN' /usr/local/psa/var/log/maillog* | awk '{print $9}' | sort | uniq -c | sort -nr | head
891574 sasl_username=admin@example.com

To stop spam from being sent, change passwords for compromised accounts and restart the Postfix service.

 

Suspend a domain via command line Plesk

 /usr/local/psa/bin/domain -u yourdomain.com -status disabled

Domains are not listing and showing following error on Plesk Panel:

[stextbox id=”alert”]The webspace was suspended. All sites hosted with the webspace are not available.[/stextbox]

Unsuspend domain via command line Plesk

/usr/local/psa/bin/domain -u yourdomain.com -status enabled

Error when ftp to a domain

DS28220.domain.com proftpd[16643]: error: no valid servers configured
DS28220.domain.com proftpd[16643]: Fatal: error processing configuration file ‘/etc/proftpd.conf’

Edit the /etc hosts file and put the IP and the name in it:


Nano /etc/hosts
DS28220.domain.com 129.33.44.55

Restart xinetd

service xinetd restart

Getting email logs that show the following?

mail qmail-queue-handlers[8672]: Handlers Filter before-queue for qmail started …Jul 7 14:17:18 mail qmail-queue-handlers[8672]: from=domain@domain.comJul 7 14:17:18 mail qmail-queue-handlers[8672]: to=domain@domain.comJul 7 14:17:18 mail greylisting filter[8673]: Starting greylisting filter…Jul 7 14:17:18 mail qmail-queue-handlers[8672]: handlers_stderr: DEFERJul 7 14:17:18 mail qmail-queue-handlers[8672]: DEFER during call ‘grey’ handlerJul 7 14:17:26 mail pop3d: Connection, ip=[::ffff:203.197.xx.xx]Jul 7 14:17:26 mail pop3d: LOGOUT, ip=[::ffff:203.197.xx.xx]

In this case its referring to greylisting which you can choose to disable if you wish, http://kb.parallels.com/en/6359 is an article that refers to it.

Or run:

/usr/local/psa/bin/grey_listing --update-server -status off

First you will want to set up subscriptions for the domains in the plesk panel. Once they are created you can run the commands below:

Here are a few commands that should help.

1.) rsync example. This will move the data from one drive to the other.


rsync -avz /mnt/slave/var/www/vhosts/"domain name"/httpdocs /var/www/vhosts/"domain name"/httpdocs

You will want to change the “domain name” to the one you are working on at the time.

2.) Changing ownership:


chown -R "ftpusername":psacln /var/www/vhosts/"domain name"/httpdocs/*

You will want to change the “ftpusername” to what you set up for each domain when creating the subscription.

If the sites are simple, these are the only 3 steps you should need to take for each domain.

Update:

I would use the rsync command rather than cp. Rsync will keep permissions the same. The command would look something like:


rsync -aPSv /mnt/olddrive/var/www/vhosts/domain.com/httpdocs/somedirectory/ /var/www/vhosts/domain.com/httpdocs/restoredirectory/

You can also preview what will be synced by adding –dry-run to the command. This doesn’t actually copy anything, just shows you what’s going to happen e.g.


rsync -aPSv /mnt/olddrive/var/www/vhosts/domain.com/httpdocs/somedirectory/ /var/www/vhosts/domain.com/httpdocs/restoredirectory/ --dry-run

The databases are in /mnt/olddrive/var/lib/mysql

One thing you might try is to stop mysql, change datadir in /etc/my.cnf to /mnt/olddrive/var/lib/mysql, then restart mysql and dump your databases. Then stop mysql, revert datadir back and restart mysql again.

When MySQL is running using the slaved drive as the datadir, you can use this to log in to MySQL:


mysql -uadmin -p`cat /mnt/olddrive/etc/psa/.psa.shadow

alternately you can set skip-grant-tables in the /etc/my.cnf file until you have things running again.

You can either dump your databases as one file or as separate files for each DB – http://www.commandlinefu.com/commands/view/2916/backup-all-mysql-databases-to-individual-files