Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I open a message with an attachment and choose to "Open" the attachment, thunderbird downloads the attachment and saves it in /tmp and then opens it.

For security reasons I would like to be able to change the directory where the file is saved from /tmp to somewhere (I will use an encrypted volume). I cannot find a setting in thunderbird to do this, does anyone know if this is possible?

share|improve this question
    
Does Thunderbird put them in /tmp directly, or does it use a sub-directory of /tmp? –  Stefano Palazzo Jan 4 '11 at 11:52
1  
It puts them directly in /tmp –  Jon Brett Jan 4 '11 at 12:37
    
I would recommend to use tmpfs for /tmp, that will prevent the data from being stored on disk. If there is a user logged on with admin privileges it will be able to access your encrypted data as soon your are logged in anyway. –  João Pinto Jan 4 '11 at 13:26
1  
I am the only user on my machine with local root access. I need to avoid storing this data in the clear. Besides, the merits (or not) of encryption are beyond the scope of my question which concerns changing the temporary storage directory of thunderbird –  Jon Brett Jan 4 '11 at 14:36

2 Answers 2

up vote 3 down vote accepted

I have a workaround: Thunderbird uses the standard environment variable $TMP by default to determine where to store temporary files. It also uses this folder when you select to "Open" a mail attachment.

Therefore I have simply made a simple script to set this environment variable before launching thunderbird. I have modified my thunderbird shortcuts to use this script.

#!/bin/sh
export TMP=/media/truecrypt1/scratch
nohup thunderbird &

I would still be interested if anyone else has a more elegant solution; perhaps one that only affects the storage location of "Opened" attachments.

share|improve this answer
2  
Instead of exporting TMP you can define it on the next line; eg write TMP=/media/truecrypt1/scratch nohup thunderbird & on one line. –  jwpat7 Mar 15 '13 at 1:41
    
Great discovery. I'm using this now myself. Thanks. –  Pistos Jun 7 '13 at 18:17

If you use an encrypted container, consider mounting a tmpfs over /tmp. This won't be encrypted, but it will be stored only in RAM and its contents will not persist over reboots.

Add this to /etc/fstab:

tmpfs           /tmp            tmpfs   noatime,mode=1777      0       0
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.