Updating FileRun

To update FileRun on a development server before updating production, you can clone the installation on the hostname “dev.yourhostname.com” or “local.yourhostname.com”.
For Docker users: updating the Docker image will only update the FileRun server environment.

FileRun updates are installed from the installation's control panel.

Updates install one after the other and there is no way of skipping to the latest version while keeping your settings.

To install a FileRun update, please follow these steps:

Make a backup of the FileRun installation.

This step is optional, but in the rare case something goes sideways during the update process, you will need this to get FileRun back online.

If PHP will not be able to replace a file, because of its permission settings, the update will fail and the FileRun installation may become unusable.

To avoid this, please try to set the permissions of the the entire FileRun installation folder so that PHP can replace all files without problems. You will be able to set the permissions back, after installing the update.

On a Linux server running Apache with FileRun installed at “/var/www/html”, one would adjust ownership of the entire folder like this:

chown apache:apache -R /var/www/html

The above assumes that the system user under which Apache is running is named “apache”. Sometimes this user is called “www-data” or similar. (Tip: use ls -al /var/www/html/system/data/temp to see the name of the system user owning one of the existing temporary files).

On Linux servers, if FileRun still fails to update its own files due to permissions problems, your server might be running SElinux. In which case you will need to either temporarily disable SElinux:

setenforce 0

Or change the SElinux context of the FileRun installation folder:

chcon -t httpd_sys_rw_content_t -R system/data

Your server administrator or hosting service tech support would be able to help you best with making sure PHP has write access over the FileRun application files.

If you are using Microsoft IIS web server, you need to right click the FileRun installation folder and add the system user “IUSR_<computer-name>” (Internet guest account) user to the list of users who have access to the folder, enabling the “Modify” and “Write” permissions.

Make sure the MySQL/MariaDB user that FileRun is configured with, has temporary ALTER and DROP permissions.

To do that, connect to the database server and run the following commands:

GRANT  ALTER, DROP ON filerun.* TO 'filerun'@'localhost';  
FLUSH PRIVILEGES;  

The above assumes your MySQL/MariaDB connection username is “filerun”. Adjust accordingly.

To connect to the MySQL/MariaDB database from a Linux servers' command line:

mysql -h localhost -u root -p

Tip: You can find the current connection information inside the file system/data/autoconfig.php.

You can check its contents like this:

tail system/data/autoconfig.php

1. Access your FileRun installation and login as superuser (The default login name of the superuser is admin or superuser).

2. Open the Control panel and navigate to FileRun » Update (Software update in older versions)

3. Click the Check for updates button and wait while FileRun shows the result.

Read carefully the update's description and notes.

4. Click the Download update button and wait for the update to download.

5. Click the Install update button to install the update.

Read the update log carefully and check for error messages.

If you encounter errors that you do not know how to fix, drop us a quick message.

Translations

You might also need to update the loaded translations.

Make the FileRun installation folder read-only again:

chown root:root -R /var/www/html

But allow FileRun/PHP access to write to the data folder:

chown apache:apache -R /var/www/html/system/data

Remove again the ALTER permissions from the MySQL/MariaDB user:

REVOKE ALTER, DROP ON filerun.* FROM 'filerun'@'localhost';  
FLUSH PRIVILEGES;

See also: https://docs.filerun.com/secure

Recovering a broken installation

If you have a backup of the FileRun installation folder, simply restore it, fix the problem indicated by the error in the update log, and try again.

If you ignored the advice about creating a backup, tried to install an update and failed, leaving your FileRun installation unusable, here are the steps to fix it:

(You can still make a backup of the broken FileRun installation folder and its database now, to avoid loosing your user accounts, settings and documents by mistake!)

You need a FileRun installation kit that matches the FileRun version you were last running, before it got broken. It is important that you have the exact same version, because you are going to replace the application files and these need to match the MySQL database structure. (We no longer make public installation kits for older FileRun versions. We can provide via e-mail request only to owners of Enterprise licenses with valid support service.)

This guide is assuming your FileRun installation is installed inside /var/www/html/filerun.

1. Create the empty folder /var/www/html/broken (next to the filerun folder)

Linux command example:

mkdir /var/www/html/broken

2. Move everything from inside the old install folder /var/www/html/filerun to the newly created /var/www/html/broken folder.

Linux command example:

mv /var/www/html/filerun/* /var/www/html/broken/

3. Upload the FileRun installation zip archive inside the now empty /var/www/html/filerun, and extract it there. (If you are upgrading to the latest FileRun version, you can download the installation zip archive from your FileRun client account, under the specific license you will be using.)

Linux command example:

[/var/www/html/filerun]# unzip FileRun.zip

At this point, accessing the URL of your old FileRun installation in a browser should show the FileRun installation wizard of a brand new installation.

4. Rename the default data folder which was created from the zip at /var/www/html/filerun/system/data to anything else. (We use 'rename' or 'move' instead of 'delete', to avoid accidental data loss.)

Linux command example:

[/var/www/html/filerun/system]# mv data _data_renamed

5. Move the old data folder from the broken folder /var/www/html/broken/system/data to /var/www/html/filerun/system/data

Linux command example:

[/var/www/html/]# mv broken/system/data filerun/system/

At this point the FileRun installation should be restored. Confirm by accessing it in a browser.

6. Make a backup of your now working FileRun installation and follow the above update installation guide, without skipping any step ;)