Best place to temp folders for use in policy

cgiordano
Contributor

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.

4 ACCEPTED SOLUTIONS

Snickasaurus
Contributor

/Users/Shared
/private/tmp

View solution in original post

sean
Valued Contributor

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/.

View solution in original post

Chris_Hafner
Valued Contributor II

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

View solution in original post

apizz
Valued Contributor

/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.

View solution in original post

5 REPLIES 5

Snickasaurus
Contributor

/Users/Shared
/private/tmp

View solution in original post

sean
Valued Contributor

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/.

View solution in original post

Chris_Hafner
Valued Contributor II

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

View solution in original post

apizz
Valued Contributor

/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.

View solution in original post

cgiordano
Contributor

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