Default package download location?

Ke_ReM
New Contributor III

I am setting up 2 new policies to (1) uninstall and the old Bitdefender Onprem client and then (2) install the new cloud client.

the first works fine and silently uninstalls the old Bitdefender client.

The second policy fails. The error given is related to the download target location of the package.

Ke_ReM_0-1638473066908.png

This is the simple script that worked previously.

installer -target / -pkg /Users/Shared/antivirus_for_mac.pkg

 

We are running Jamf 10.27 still on macOS Catalina and I think there may have been some changes creep in such as inability to write to system volume which might be what is causing the download failure.

1 ACCEPTED SOLUTION

Ke_ReM
New Contributor III

Thanks but I figured it out, it was my bad.

I had not created the required folder structure in the package “/Users/Shared/“ prior to exporting it (which is the location the script was expecting to find the package), so it was literally trying to save to root which is the default location and was getting denied causing the error.

Interestingly, I also found that if you had previously downloaded a similarily named package to that location (previous version of the installer) and not removed the package, the script could run it and you would end up with the older version reinstalling. So I scripted in a line to remove any package with that name before downloading it to avoid such situations.

 

View solution in original post

3 REPLIES 3

mainelysteve
Valued Contributor II

Your package is the issue here not so much the download location of the installer as /Users/Shared isn't a System location. 

I suspect your Bit Defender pkg is trying to install a system extension or a kext into /System which isn't kosher anymore. It's either of those two or a launchdaemon. Take a peek at your installer using Suspicious Package and see where things are going.

jpeters21
Contributor II

try changing the target to /Applications

i.e: installer -target /Applications -pkg /Users/Shared/antivirus_for_mac.pkg

Ke_ReM
New Contributor III

Thanks but I figured it out, it was my bad.

I had not created the required folder structure in the package “/Users/Shared/“ prior to exporting it (which is the location the script was expecting to find the package), so it was literally trying to save to root which is the default location and was getting denied causing the error.

Interestingly, I also found that if you had previously downloaded a similarily named package to that location (previous version of the installer) and not removed the package, the script could run it and you would end up with the older version reinstalling. So I scripted in a line to remove any package with that name before downloading it to avoid such situations.