mirror of
https://github.com/amidaware/tacticalrmm.git
synced 2026-04-26 06:55:52 +03:00
[GH-ISSUE #1017] Allow custom tmp path for Linux agent #2567
Labels
No labels
In Process
bug
bug
dev-triage
documentation
duplicate
enhancement
fixed
good first issue
help wanted
integration
invalid
pull-request
question
requires agent update
security
ui tweak
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tacticalrmm#2567
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 @georgebarnick on GitHub (Mar 22, 2022).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1017
This may be an edge case but in situations where /tmp/ has locked down permissions or special handling on the system, Tactical RMM has trouble installing and executing scripts.
I've been able to verify this in one particular case, which is on CentOS 7 servers running a clean install of cPanel/WHM. From my understanding, cPanel locks the /tmp/ filesystem down using a script they call securetmp. Beyond that I haven't looked very much into this case and not entirely sure on to what extent it's locked down, but from what I can tell, execution is prevented entirely in that filesystem, even as root.
What I was able to confirm however is that during the install using the Linux installation script, it can't execute ./meshagent inside of its tmp directory it downloads to. Moving ./meshagent somewhere else (such as /home/) works and installs fine however. Once the agent is installed, if you try to execute a script, it gets Permission Denied inside of /tmp/trmmXXXXXXXXXX/. Example below:
Since this may be an edge case and could vary depending on what types of Linux installs might handle /tmp/ differently, I was thinking it could be a good feature request to specify a custom temporary file path for Tactical RMM to use during the install process, rather than it being forced to use /tmp/.
@bbrendon commented on GitHub (Mar 22, 2022):
From a cpanel machine I have access to, I think this might be what the issue is.
noexec.It might be possible to remove noexec, install, then re-add it. I'm not sure what the best practice is here.
@wh1te909 commented on GitHub (Mar 24, 2022):
I've pushed a fix to fallback to the current directory if creating it in the tmp dir fails
@wh1te909 commented on GitHub (Mar 25, 2022):
fixed in release 0.12.1 please check release notes. you'll need to manually update the agent if already installed since /tmp was used for agent update as well