Centova Cast
v2.1.4

 
 
Box shot
Featured Product
Centova WebSupport
Chat LIVE with your web site visitors -- no downloads!

 
Helpdesk
Can't find what you need?


Disaster recovery
Jan 13, 2013 11:00pm
Question:
My Centova Cast installation was damaged and I tried to repair it.  I've re-uploaded all of the files; can I just set the permissions to 0777 to make everything work?
Answer:
No.  Setting permissions to 0777 is guaranteed to cause problems -- both technical and security-related.  Note that Centova Cast is not a typical PHP script; it is a control panel, and due to its nature of operation it has special requirements in terms of ownerships and permissions.  More information is included in the sections below.


Procedures described hereunder are dangerous and unsupported

Please note that we cannot provide support for anything explained below; this article is intended to assist advanced users in recovering a damaged installation, but this is outside of the scope of the Centova Cast support agreement.  Please also note that the procedures described below are advanced and risky, and may result in data loss if performed incorrectly. 


Recovery by a Centova Technologies Technician

If you have any doubts about your ability to perform a recovery, but are sure your data is intact, you may wish to contact Centova Technologies to have an experienced technician perform the recovery for you.  In most cases, this requires less than an hour of time and thus will only incur a fee of one hour of professional services (priced at USD$69.99 at the time of this writing).


Manual recovery

If you are sure you have re-uploaded all of the files correctly, and/or your original files are still intact and have not been damaged or deleted, and are all located in the same paths as you originally installed them:
  1. Ensure that the permissions on /home/centovacast and your Centova Cast web interface directory (and their contents) are NOT 0777.  Recursively set them to 0755, i.e.:
    chmod -R 0755 /home/centovacast
    chmod -R 0755 /path-to-centovacast-web-interface/
  2. Recursively change the owner and group of /home/centovacast to the user account under which Centova Cast was installed.  Usually, the user account is named 'centovacast', i.e.:
    chown -R centovacast.centovacast /home/centovacast/
  3. Change to the /home/centovacast/system/runascc directory and run these two commands:
    rm -f runascc spawn castd
    make all
This should yield a working Centova Cast installation.


Changing the Centova Cast user account

While we strongly recommand against doing so, if you change the UID/GID of the user account under which Centova Cast runs as part of the above process, you will need to edit the Centova Cast database and change the ccuid/ccgid fields in the 'settings' table to match the new UID/GID.


Changing the Centova Cast core files path

While we strongly recommand against doing so, if you change the location of Centova Cast's files, you will need to edit config.php in your Centova Cast web interface directory, as well as in /home/centovacast, and update them with the new path.  You will also need to edit your Centova Cast database and change the 'vhostpath' field in the 'settings' table.


Reinstallation and recovery

If your Centova Cast installation is damaged beyond repair, the best approach is often to reinstall Centova Cast, then restore your old data.  Please note that this is a particularly risky procedure; be sure to backup your data carefully in advance.

To perform a reinstallation and subsequent recovery:
  1. Backup your Centova Cast database and the /home/centovacast/vhosts/ directory, maintaining permissions and ownership on the latter (i.e., using tar or rsync for the backup).  If either of these items are lost, then your installation has sustained permanent data loss and recovery will not be possible.

    Note that this is not simply a cautionary procedure; you will need to restore this backup at the end of the recovery process, so do not skip this step.
  2. Delete the /home/centovacast/system directory, the /home/centovacast/vhosts directory, and your Centova Cast web interface directory.
  3. Download a fresh copy of Centova Cast from the Centova Technologies web site.  Ensure that you download the exact same version as you already have installed.  If you are using an older version that is no longer listed on our web site, please contact us and we will provide a copy of the older version if it is available.
  4. Unpack the Centova Cast tarball to a temporary directory.
  5. Edit the install.sh file and set the CREATEUSER setting to 0.  This will allow Centova Cast to re-use your existing Centova Cast UID/GID.
  6. Install Centova Cast as usual, as descrbied in the installation manual.  Ensure that you install it exactly as you did the first time (using the same paths and so-on) otherwise your database will become desynchronized from the configuration files.
  7. Remove all tables from the newly-installed Centova Cast database, and restore the backup you made of your Centova Cast database.
  8. Restore your backup of the /home/centovacast/vhosts/ directory, maintaining ownerships and permissions.
At this point, you should have a working Centova Cast installation.

Posted by Centova Technologies
feedme@centova.com