[GH-ISSUE #459] Upload files back to the TacticalRMM server #284

Open
opened 2026-03-02 02:15:06 +03:00 by kerem · 4 comments
Owner

Originally created by @davidrudduck on GitHub (May 2, 2021).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/459

Originally assigned to: @wh1te909 on GitHub.

In certain use cases, we need to automatically retrieve a file (or the results of a script) and bring them back. It would be preferable to have it able to bring back to a somewhere on the TacticalRMM server particularly in cases where the remote site may have IP restrictions on certain transfers. This way we can whitelist our subnet and not run into issues.

For example, either a PowerShell based PUT command to push a file to a URL or a command in TRMM that will facilitate picking up a file from an agent and storing it in $FileStore/$ClientName/$SiteName/$AgentName/

In our use case, for example, we might want to execute a program that creates a ZIP file and then once that program finishes have that file uploaded back to us.

Originally created by @davidrudduck on GitHub (May 2, 2021). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/459 Originally assigned to: @wh1te909 on GitHub. In certain use cases, we need to automatically retrieve a file (or the results of a script) and bring them back. It would be preferable to have it able to bring back to a somewhere on the TacticalRMM server particularly in cases where the remote site may have IP restrictions on certain transfers. This way we can whitelist our subnet and not run into issues. For example, either a PowerShell based PUT command to push a file to a URL or a command in TRMM that will facilitate picking up a file from an agent and storing it in $FileStore/$ClientName/$SiteName/$AgentName/ In our use case, for example, we might want to execute a program that creates a ZIP file and then once that program finishes have that file uploaded back to us.
Author
Owner

@wh1te909 commented on GitHub (May 7, 2021):

I am thinking to make this easier for you, to just build this into the agent and then you can call the exe from whatever script you want something like this \path\to\program files\tacticalrmm.exe -m uploadfile -filepath "C:\somepath\somefile.zip"

this way you don't have to know the token client site etc since the agent already has that info

or would you rather create the put payload yourself in the script?

<!-- gh-comment-id:833991314 --> @wh1te909 commented on GitHub (May 7, 2021): I am thinking to make this easier for you, to just build this into the agent and then you can call the exe from whatever script you want something like this `\path\to\program files\tacticalrmm.exe -m uploadfile -filepath "C:\somepath\somefile.zip"` this way you don't have to know the token client site etc since the agent already has that info or would you rather create the put payload yourself in the script?
Author
Owner

@davidrudduck commented on GitHub (May 10, 2021):

Where do you envisage the files would end up using this method?

I actually think this is an elegant way of approach it - and controlling where and how the file goes back.

<!-- gh-comment-id:836056481 --> @davidrudduck commented on GitHub (May 10, 2021): Where do you envisage the files would end up using this method? I actually think this is an elegant way of approach it - and controlling where and how the file goes back.
Author
Owner

@wh1te909 commented on GitHub (May 10, 2021):

there is already a base folder setup with proper perms /rmm/api/tacticalrmm/tacticalrmm/private/ where the rmm stores files, i can just have it go there into a folder called files and if you want too i can have it create subfolders for client/site, like /rmm/api/tacticalrmm/tacticalrmm/private/files/clientname/sitename/yourfile.zip

<!-- gh-comment-id:836212788 --> @wh1te909 commented on GitHub (May 10, 2021): there is already a base folder setup with proper perms `/rmm/api/tacticalrmm/tacticalrmm/private/` where the rmm stores files, i can just have it go there into a folder called `files` and if you want too i can have it create subfolders for client/site, like `/rmm/api/tacticalrmm/tacticalrmm/private/files/clientname/sitename/yourfile.zip`
Author
Owner

@silversword411 commented on GitHub (May 31, 2021):

i can have it create subfolders for client/site, like /rmm/api/tacticalrmm/tacticalrmm/private/files/clientname/sitename/yourfile.zip

Sounds like a good idea to keep them separated. Going to expose these in the admin as well?

<!-- gh-comment-id:851486772 --> @silversword411 commented on GitHub (May 31, 2021): > i can have it create subfolders for client/site, like `/rmm/api/tacticalrmm/tacticalrmm/private/files/clientname/sitename/yourfile.zip` Sounds like a good idea to keep them separated. Going to expose these in the admin as well?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#284
No description provided.