Controlling use of /tmp vs /var/tmp

Ed Greshko ed.greshko at greshko.com
Tue Apr 21 23:53:17 UTC 2015


On 04/22/15 07:20, Max Pyziur wrote:
>
> Greetings,
>
> Recently, I tried asking a question in regard to the use of /tmp vs /var/tmp in F21?
>
> Is there a way of controlling where temporary files used by certain programs are stashed?
>
> With /tmp the files are erased w/ each reboot; w/ /var/tmp they sit there until the files get wiped by something like tmpwatch.
>
> As an example, I open enough pdf files using Firefox; in turn, I export them to Acrobat. There, they are stored in /tmp, until I save them to some other location. If I forget, or there is a system crash, the files are lost.
>
> In older versions of Fedora (my prior one was F18), temporary files in Acrobat were assigned to /var/tmp.
>
> Is there a way or place to specify this?
>
>

I don't think there is a way to force all applications to use a specific tmp file directory location.

You can, however, change /tmp from being tmpfs to being on actual persistent disk storage.  Simply do,

systemctl mask tmp.mount

This takes effect on the next boot.

-- 
If you can't laugh at yourself, others will gladly oblige.


More information about the users mailing list