0
Answered

Permission issue when trying to update

info 1 year ago updated 1 year ago 2
When trying to update FileRun, I get the error below. I believe that the installation is fine (and not broken) but I probably need to grant some write permissions. Could anyone please suggest what to do? Which permissions should be amended?  For which user?

Developer info: de: met:300 ml:256M
-------------------------------------
Cleaning after previous update...Done
Extracting update...Done
Running update:
-------------------------------------
Checking files permissions..."/var/www/html/js/ext/ux/overrides.js" is not writable. Fix the problem and try again.
"/var/www/html/customizables/plugins/html_editor" is not writable. Fix the problem and try again.

Failed to install update. Please check above for error messages.
Your FileRun installation might now be broken. If it is, please follow this guide to restore it: https://docs.filerun.com/updating#recovering_a_broken_installation.

-------------------------------------
Log saved at "/var/www/html/system/data/temp/update_2021.06.27_26-07-21.log.txt"

Answer

Answer
Answered

You need to give "write" permission over the entire "/var/www/html" folder to the system user under which PHP is running.

You can check the system user by listing the contents of the folder /var/www/html/system/data/temp/" and see what "user and group" created the files inside.

On a basic Apache server, that would be something like "www-data" or "apache".

You fix this problem like this:


Step 1:

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


This changes the ownership of the entire FileRun folder to user "www-data" and group "www-data", so it can make changes.


Step 2: You install the FileRun update from the FileRun control panel.

Step 3: You revert back the ownership to something secure:

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

The first command changes ownership to "root" (assuming your current command line access has root permissions) to prevent PHP to make changes. The second command sets the FileRun data folder to be still writable by FileRun.

Answer
Answered

You need to give "write" permission over the entire "/var/www/html" folder to the system user under which PHP is running.

You can check the system user by listing the contents of the folder /var/www/html/system/data/temp/" and see what "user and group" created the files inside.

On a basic Apache server, that would be something like "www-data" or "apache".

You fix this problem like this:


Step 1:

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


This changes the ownership of the entire FileRun folder to user "www-data" and group "www-data", so it can make changes.


Step 2: You install the FileRun update from the FileRun control panel.

Step 3: You revert back the ownership to something secure:

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

The first command changes ownership to "root" (assuming your current command line access has root permissions) to prevent PHP to make changes. The second command sets the FileRun data folder to be still writable by FileRun.

This is simply a perfect answer. So lucid and so succinct: thank you! That's perfect.