Posted on 05-14-2018 07:10 AM
I want to download a DMG package I have on our JSS server to examine the package contents. How do I download a package from JSS?
Posted on 05-14-2018 07:17 AM
Disregard, it turns out that it was a simple matter of connecting via Finder with smb://serveraddress
Posted on 03-08-2019 09:33 AM
Can you do this with a cloud instance with Jamf? I would like to download a package was uploaded to Jamf. Is this possible?
03-08-2019 10:04 AM - edited 03-13-2023 12:00 PM
Not with a cloud instance, at least not using the method mentioned above of navigating to a share in the Finder. Cloud DPs are entirely HTTPS based, so there's no share that gets mounted to a machine.
However, if you only have a handful of packages you need to pull down again, you can create a temp policy that has those packages added to it, but all set to Cache instead of Install. Scope it to your Mac or another one you have access to and let that policy run. The packages will be cached into /Library/Application Support/JAMF/Waiting Room/
The Waiting Room folder is locked by default, so to extract the contents to your Desktop or some other location, you can run this in Terminal after the policy is done
sudo find /Library/Application Support/JAMF/Waiting\ Room -name *.dmg -o -name *.pkg -exec cp {} /path/to/folder/ \;
That should locate any .pkg or .dmg files cached in the Waiting Room and copy them to another location. Remember to change the /path/to/folder/ to something legit.
Posted on 03-08-2019 12:39 PM
Not cloud (yet), but couldn't curl still be used?
curl -O -u username:password https://cloudurl/path/file.pkg
Posted on 03-12-2019 05:40 AM
@mm2270, does the cached package get removed after the policy? When I ran the command after the policy was done, nothing happens. The command "runs" after pressing return with no errors but the Waiting Room folder doesn't go to the target folder (I used Desktop).
Posted on 03-12-2019 05:44 AM
@CGundersen, When I navigate to the package in the console, there is no path that includes the actually .pkg file in the URL so I don't think that will work. You would think that JSS would provide a "two-way" communication scripts, packages, etc.
Posted on 03-12-2019 07:37 AM
@joethedsa No, caching the package should leave it on disk, like I said, until something removes it later. If you have any policies that are set to install all cached, then when that runs it would try to install anything in that Waiting Room folder and then remove them.
If the command I gave you isn't working, try opening a root shell to navigate into the Waiting Room folder. Run these commands in Terminal
sudo -s
<enter password when prompted>
cd /Library/Application Support/JAMF/Waiting Room/
ls -l
The last one should list the contents of the Waiting Room folder. See what's in there.
Posted on 03-12-2019 08:19 AM
@mm2270, I'm getting the same result when following your commands. the ls -l command just goes back to the bash prompt after hitting the "Return" button. No errors or nothing. Hmm...
Posted on 03-12-2019 08:22 AM
@joethedsa Are you sure the policy to cache the package ran successfully? If it did, the pkg should be in that location. I would go back and double check your policy. Make sure where the package is added that it's set to "Cache" and not "Install" from the action drop down. If it ran already in the policy log, flush it so it will run again. Once you see that it has run, go back and check that folder again.
Posted on 03-12-2019 09:01 AM
I have been using the method @mm2270 posted for years. Sadly, this is the only way to do it. They allow for downloading other items from the (cloud) JSS, so why not packages? I hate having to keep copies of all the JSS' I manage.
I wonder if there's a FR for this...
*Edit: I actually do it a little differently. I just opened up the priv's on the Waiting Room folder rather than copying items elsewhere...
Posted on 03-14-2019 06:36 AM
@mm2270, thank you. I overlooked the cache setting in the policy. This worked flawlessly after that. Thanks for the tip. Cheers!
Posted on 05-20-2019 03:00 PM
You can also copy the download link and token from the policy logs.
Posted on 05-21-2019 03:08 PM
@FletcherS7 , Thank you. I will have to try that.
Posted on 12-06-2020 12:58 PM
Hi @joethedsa were you able to achieve this? I want to be able to download as well but cant find a way.
Posted on 12-06-2020 03:19 PM
@globaldomination - this help?
https://github.com/BIG-RAT/jamfcpr
Posted on 12-07-2020 11:28 AM
@leslie - thx - this works great! Should be a Jamf tool by default!
Posted on 12-07-2020 02:03 PM
@globaldomination , yes I was able to get it to work by following what @mm2270 shared on 3/8/2019. I ended up using the running the command in the "Files and Processes" payload and copied the package to a tmp folder. I wasn't sure how permissions were going to be handled but I was able to execute the .pkg file with no issues. Hope this helps!
Posted on 05-19-2021 11:52 AM
I was able to get it to work following the response Posted: 3/12/2019 at 9:37 AM CDT by @mm2270 using terminal.
Once I verified the files , used the simple cp command to dump the files to a known folder and it worked.
eg: cp *.pkg /Users/"user folder"/Documents/untitled folder