Activating Encrypted Protected Storage From Command Line

Introduction

When FileCloud server is restarted, a password protected storage encryption system is not activated automatically. This design is for additional security, such that the encryption password is not stored on the same physical server. 

FileCloud server storage activation can be also done from command line. 

Prerequisites


Enable PHP CLI Mode

To run the following commands, PHP CLI mode needs to be enabled.

In Linux, edit the file /etc/php5/cli/php.ini and make sure the module mongo.so is enabled. Without this the reset password command will fail.
To enable mongo.so, add the following line at the end of file /etc/php5/cli/php.ini (if this line doesn't exist in the file)
extension=mongo.so

In Windows, the PHP cli mode is already enabled in FileCloud installer.

Activating Storage

  1. In a command line enter:
    For Windows:

    cd c:\xampp\htdocs\resources\backup
    PATH=%PATH%;C:\xampp\php

    For Linux:

    cd /var/www/html/resources/backup/
  2. To activate storage using a password, for both Windows and Linux, enter:
    (In the following example, the command activates site1.filecloud.com using password 'root01')

    php activatesite.php -h site1.filecloud.com -p root01 

    To activate storage on Linux only using a recovery key:
    (In the following example, for Linux only, the command activates site1.filecloud.com using a recovery key)

    Activating Site From Command Line
    php ./activatesite.php -h site1.filecloud.com -r "/tmp/recovery.ppk" 
    


Note

To activate default site, use -h default