Posted on 11-02-2018 08:43 PM
Hello,
What is the easiest way to drop a folder or a file in a users Library folder? I would like to drop a whole folder in, maybe a 1 MB folder, or just place a .file in a specific folder. The only catch is the folder needs to already exist with option 2, with option 1 it shouldn't matter.
I can use composer to make the DMG/PKG if needed or leave it as a folder/file.
Thanks!
Posted on 11-03-2018 06:11 AM
Personal opinion on the best 2 ways to skin this cat. IF YOU HAVE A WEB SERVER - YOU CAN DO OPTION 1. If not, Do Option 2.
Option 1: Make a script in your Jamf Pro Dashboard & Deploy it as a policy
#!/bin/bash
#Creates Directory in Users Library
mkdir /Users/USER/Library/NewFolder
#Downloads File to Directory in Users Library
curl -o /Users/USER/Library/NewFolder/NewFile http://server.institution.com/FolderPath/**NewFile**
#Hides the newly created directory in Users Library
chflags hidden /Users/USER/Library/NewFolder
#Dictate Files Owner & Permissions
chmod ### /Users/USER/Library/NewFolder/NewFile
chown user:group /Users/USER/Library/NewFolder/NewFile
Option 2: Create a Package and deploy it in a policy.
Posted on 11-03-2018 08:58 PM
Thanks @Hugonaut