mirror of
https://github.com/amidaware/rmmagent.git
synced 2026-04-26 06:45:48 +03:00
[GH-ISSUE #39] Error Running Scripts due to Read-Only File System - NixOS #28
Labels
No labels
bug
bug
enhancement
fixed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rmmagent#28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SoarinFerret on GitHub (Nov 24, 2023).
Original GitHub issue: https://github.com/amidaware/rmmagent/issues/39
github.com/amidaware/rmmagent@db17e3e28e/agent/utils.go (L342):L365NixOS is a Linux distribution built on top of the Nix package manager. Its declarative configuration allows reliable system upgrades via several official channels. One of the features it has is the location where all the binaries are stored are a read-only filesystem.
I am able to successfully build and use the rmmagent on NixOS, except my scripts fail to run due to them trying to run in the same directory where the executable is located. Would the maintainers be open to a pull request adding a runtime feature flag allowing the tmp directory to be changed to a specific location (like
--tmpdir /opt/trmm/scripts)? This would not change the default functionality, and could be easily specified in the systemd unit file that my nix package creates.@SoarinFerret commented on GitHub (Nov 24, 2023):
In the meantime, for anyone interested, the following patch file does allow scripts to run correctly on agent v2.5.0 in NixOS. This sends the scripts to
/opt/tacticalrmm(only accessible by the user running the agent, which is by default root)@truatpasteurdotfr commented on GitHub (Feb 5, 2024):
+1, that would also allow diskless linux machines to be used with read-only rootfs.
@NiceGuyIT commented on GitHub (Aug 11, 2025):
To add to the above, here is the diff to relocate
/opt/tacticalagentand/etc/tacticalagenton systems such as TrueNAS Scale where many of the system mount points are read-only and the files are kept on a mountpoint. Obviously the systemd service script will need to be adjusted.