Per user tmp?

Mikkel L. Ellertson mikkel at infinity-ltd.com
Mon Sep 1 16:53:22 UTC 2008


Gilboa Davara wrote:
> Hello all,
> 
> Any idea how I can setup a per-user tmp directory?
> E.g.
> USER1 has /tmp -> /tmp/USER1, /var/tmp -> /var/tmp/USER1.
> USER2 has /tmp -> /tmp/USER2, /var/tmp -> /var/tmp/USER2.
> etc.
> 
> In short, I want each user to have a private /tmp, and /var/tmp -
> without having to resort to using virtualized/jailed environment.
> 
> - Gilboa
> 
> 
One thing I have done is create a tmp directory in each user's home
directory, and then set the TMP variable to point to it. You will
also want to add the tmp directory to /etc/skel so new users get it
created for them automatically. (I added "TMP=$HOME/tmp" and added
TMP to the export list in .bashprofile, but you could also add files
to /etc/profile.d to cover both the c and sh shell variants.

OH yes, the /tmp directory does limit what other users can do to
your files in /tmp.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20080901/ec0b18f9/attachment-0001.sig>


More information about the fedora-list mailing list