Summary
Don’t let the “No changes.” fool you! There’s some actual improvement here that has been staggered to ensure everything goes through properly and without too much interference. I’ve added to the mix a permissions monitoring service and some big improvements to the update/fix version binary.
QB Permissions Monitoring Service
A recent plex update threw a bit of a wrench in this method, which resulted in the permissions of the Preferences.xml file being reset to permissions that are not readable by the Dashboard itself. This extends to stopping and starting the service. After the recent Plex update, it appears that the Preferences.xml file is resetting its permissions when restarting the service. This would result in the Dashboard showing the loading screen indefinitely (or) the Software Dashboard would become blank entirely. To combat this and keep things friendly between configs and the Dashboard, I am introducing a new service called qbpermmon.service
The QuickBox Dashboard makes use of the configs that are set by various software applications to pull data directly into view on the Dashboard. This data consist of things such as the API for various applications, as well as the editor for configs as seen on the frontend within the Software Dashboard.
How does the qbpermmon service work?
The service operates in a direct and efficient manner by firing a script that sets a time check on a config file. Any changes posted to the config (either permissions changing or editing) and the script will compare the two timestamps. If the changed timestamp is greater than the previously checked/placed value, it then fires off a quick spell to set the permissions in good order – being not too high and not too low.
The script itself is located at /usr/local/bin/fix-home-config-permissions
and is set as an executable. The script itself is quite simple. It starts by setting a while true loop that sets the loop to run indefinitely. By itself this could be a little frustrating as it would need to be fired after a reboot manually, and the additional cost of accidentally running it more than once could lead to multiple instances of the script running. To ensure this doesn’t happen, there is a service file created to handle the triggering of the script. This file is located at /etc/systemd/system/qbpermmon.service
.
The service works by utilizing systemd and enabling so it is registered on reboots. This service is also responsible for properly killing the process. The script and service uses little to no resources as we are only checking single config files, should their associated application directories exist. Currently the service only monitors LazyLibrarian and Plex configs, but this is to be extended as needed as there is no real need to add configs to applications that do not automatically reset their permissions on a service restart (much like Plex now does).
To check that the service is running and working, you can do a simple status check with systemctl status qbpermmon
. The output would look similar to the below:
❯ systemctl status qbpermmon ● qbpermmon.service - QuickBox Permissions Monitor Loaded: loaded (/etc/systemd/system/qbpermmon.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2022-10-01 11:24:57 CDT; 1 day 23h ago Main PID: 432 (fix-home-config) IP: 0B in, 0B out IO: 7.0M read, 39.1M written Tasks: 2 (limit: 4638) Memory: 9.7M CPU: 27min 18.496s CGroup: /system.slice/qbpermmon.service ├─ 432 /bin/bash /usr/local/bin/fix-home-config-permissions └─902635 sleep 5
Better update binary updating and conversion
As v3 had been completely refactored and the amount of files placed on the system dramatically reduced, there have been a few issues with the update process. One such is the addition of changes on the update. Previously, the updater would run, grabbing all the essential bits for the update. This did however present a small issue where any changes done within the actual update file would not be reflected unless you either ran another update-or ran a qb fix version
.
With this update we are now calling in the latest update/fix binary to update, then running from the new binary. This ensures that any improvements, changes, fixes … etc – are all pulled before running the update. This reduces the chances of critical changes being missed on an update and requiring users to run another qb fix version
to correct it.
Wrapping up
The addition of these two features should usher in a better level of stability in regards to both updating, as well as the permissions that are set from applications such as LazyLabrian and Plex. It’s worth mentioning that even though LazyLibrarian is not nearly as stubborn as Plex with it’s permissions, it has been added all the same as it can reset it’s permissions when various options are edited within the LazyLibrarian UI.
Another handy command builtin to QuickBox to remember is qb fix home -u USERNAME_HERE
. Should you ever encounter any errors and think that it’s permissions based, you can run this command and it will make all the necessary adjustments-while leaving directories such as .bin
, .ssh
, as well as rclone
out of the adjustment as we don’t always want to edit these in the event they have been set differently/intentionally to something else. We mainly want to focus on the QuickBox created directories
I would like to thank once more, the users that let me login to their systems to test these new additions directly, as well as everyone else for your continued support and patience. QuickBox is a beast of code and is an ever expanding project. Sometimes, it takes a village!
JMSolo will OFFICIALLY be back!!!
As an official announcement: Many of you know that recently I have lost a family member and things have been a little scattered. I am still working on updating and addressing any issues that are presented within tickets or the issue tracker as I have time. I am by no means ignoring QB during this time, only doing what I can with the limited time that I have. The weekends have taken me from the site completely (as has this weekend), but I have found time today to publish this post and will not be back on tickets until tomorrow (Tuesday, October 4, 2022 CST). These delays are rare and are not a regular reflection of the support I give, just a matter of circumstance and working through things. My presence on Discord has been null during the past few weeks due to this, but I am happy to say that I will officially be back in full swing coming up on Wednesday (October 5, 2022 CST) as there are no more delays ahead!!! Thanks again to everyone for the kind sentiments and your patience. 💖