Skip to main content
Solved

Best place to temp folders for use in policy

  • January 14, 2016
  • 5 replies
  • 51 views

Forum|alt.badge.img+9

I have a couple of scripts that I'm looking to tidy up a bit and I've noticed that with El Capitan's release Apple isn't super fond of folks adding folders where the user doesn't normally have access to. Currently, I'll drop files into /private/var/tmp/[FolderName] for a script to use.

This is mostly when a piece of software doesn't play nice with Composer so I'll drop the pkg installer into a folder in tmp and run command line against the installer. It works great but are there any better locations or suggestions that you guys might have? Not so much on the process flow but rather where I could/should drop my temp files.

Best answer by Snickasaurus

/Users/Shared
/private/tmp

5 replies

Forum|alt.badge.img+8
  • Contributor
  • Answer
  • January 14, 2016

/Users/Shared
/private/tmp


Forum|alt.badge.img+12
  • Contributor
  • January 14, 2016

In general +1 /private/tmp

Although you can do a tidy up afterwards, if you store things in /tmp/ then they will be removed naturally. Of course, if you need to reboot and continue something after rebooting then avoid /tmp/.


Chris_Hafner
Forum|alt.badge.img+27
  • Jamf Heroes
  • January 14, 2016

Ditto here: I use /private/tmp if I want the files to go away on reboot and /Users/Shared if I don't... usually.


apizz
Forum|alt.badge.img+15
  • Honored Contributor
  • January 14, 2016

/private/tmp

I only put things in /Users/Shared if there's a library or some common files / resources that all users need. For example, Ableton Live music software is built to be installed only for one user, so there are some /Library and ~/Library files that we have to make accessible to all, so we set the default location to a directory within /Users/Shared.


Forum|alt.badge.img+9
  • Author
  • Contributor
  • January 14, 2016

Thanks all for your responses. Seems I'm on the right track for this.