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!