This MR fixes the issue where running tiki-manager under Virtualmin fails with log permission errors due to user switching.
Tiki Manager, in its current state expects to be executed always with the user who has permissions in the Tiki Manager folder, so switching to the domain user causes Tiki Manager to fail due to permission issues.
There is a work in progress to allow Tiki-Manager to execute some operations as other users, but it is still not merged. That would allow some commands to be executed impersonating the domain user in the future.
Ref: https://avan.tech/item130775
Context:
Enhances stability by ensuring that no additional configuration steps (e.g., setting preferences, changing ownership) are run if instance creation fails via Tiki Manager.
Changes:
tikimanager_tiki_install_and_config now checks for ERROR string in the output of tikimanager_tiki_install().
If an error is detected, the process logs a message and skips remaining steps gracefully.
Ref: https://avan.tech/item131133
Context:
Enhances stability by ensuring that no additional configuration steps (e.g., setting preferences, changing ownership) are run if instance creation fails via Tiki Manager.
Changes:
tikimanager_tiki_install_and_config now checks for ERROR string in the output of tikimanager_tiki_install().
If an error is detected, the process logs a message and skips remaining steps gracefully.
Ref: https://avan.tech/item131133
This MR fixes the issue where running tiki-manager under Virtualmin fails with log permission errors due to user switching.
Tiki Manager, in its current state expects to be executed always with the user who has permissions in the Tiki Manager folder, so switching to the domain user causes Tiki Manager to fail due to permission issues.
There is a work in progress to allow Tiki-Manager to execute some operations as other users, but it is still not merged. That would allow some commands to be executed impersonating the domain user in the future.
Ref: https://avan.tech/item130775
This merge request addresses a permission error occurring when Tiki Manager CLI operations are executed under the domain user in Virtualmin environments.
Root Cause:
The tikimanager_execute_command() function runs the global Tiki Manager CLI using the domain user context.
This leads to failures writing logs such as:
[ERROR] The stream or file "/opt/tiki-manager/app/logs/trim-YYYY-MM-DD.output" could not be opened in append mode: Failed to open stream: Permission denied
Solution:
Updated tikimanager_execute_command() to conditionally revert the user switch and execute the command as root.
Ref: https://avan.tech/item130775
This merge request addresses a permission error occurring when Tiki Manager CLI operations are executed under the domain user in Virtualmin environments.
Root Cause:
The tikimanager_execute_command() function runs the global Tiki Manager CLI using the domain user context.
This leads to failures writing logs such as:
[ERROR] The stream or file "/opt/tiki-manager/app/logs/trim-YYYY-MM-DD.output" could not be opened in append mode: Failed to open stream: Permission denied
Solution:
Updated tikimanager_execute_command() to conditionally revert the user switch and execute the command as root.
Ref: https://avan.tech/item130775