Peter Tribble wrote:
> On 4/25/07, Darren J Moffat <Darren.Moffat at sun.com> wrote:
>        Default shell environment: TMPDIR
[snip]
> > The proposed changes are:
> >
> > - A modification to "/etc/profile" (and the matching csh file) to set TMPDIR
> >    to  "/tmp/${LOGNAME}" if TMPDIR was not set yet. If the directory
> > specified
> >    by  "/tmp/${LOGNAME}" does not exist "/etc/profile"&co. will be
> > responsible
> >    for creating this directory with the same permissions as the current
> > "/tmp".
> >    If the directory already exists "/etc/profile"&co. is responsible to
> > check
> >    whether the directory is owned by the current user (e.g.
> >    $ /usr/bin/test -O dir #) and writeable (e.g. /usr/bin/test -w dir #),
> >    if these conditions are not met TMPDIR will not be set.
> >
> >    The purpose of this change is to provide a "cleaner" layout of the /tmp
> >    filesystem on large multiuser systems - instead of storing zillions of
> >    files of various users into one directory it may be better to provide
> >    something like  a "home directory for temporary files", e.g. create one
> >    subdir per user to store  the temporary files there. This would allow
> >    users and adminstrators to find their own temporary files more easily
> >    and would avoid that something like $ ls -l /tmp #  returns a few
> > thousand
> >    files of thousands of users.
> 
> I am opposed to this change, for the following reasons:
> 
> 1. It adds significant clutter to /tmp, ensuring that all systems
> will have a cluttered /tmp

I disagree. Cluttering tons of files of various users in one single
directory is much more problematic for the (end-)_users_ than putting
everything into small subsirs, one per user.
This case is about _usability_ (e.g. improving the default shell
environment for the human beings) and not whether there is a pure
technical justification for such a change. The computer doesn't care
whether he has 10 or 500000 files in one directory but the users do have
problems such such a vast amount of data returned by $ ls -l /tmp #.

> 2. It adds additional login processing, adding some load to
> the system and slowing down logins.

Erm... today's machines have more than sufficient power to handle a few
more statements in /etc/profile. In really don't see a problem with
that.

> 3. There is no guarantee that TMPDIR will exist at any time -
> it could be deleted after login causing applications to fail.

The parent directory has the sticky bit set. Only the user itself or
"root" may be able to do that.

> 4. As TMPDIR is only set upon a certain set of conditions,
> it's possible that the value of TMPDIR will not be consistent
> between systems, or even between sessions on the same
> system, leading to erratic behaviour.

By default TMPDIR will be set unless something "unexpected" happens,
e.g. the directory exists and has the wrong ownersship/permission. The
existing checks are only there as "safeguards" and to make sure that it
doesn't override an exiting TMPDIR value. I don't see any problems with
that.

> 5. Having run large multiuser systems, this proposal is unlikely
> to help - most of the clutter in /tmp was due to manual actions
> by users rather than applications using TMPDIR.

I disagree - we have exactly this setup running since Solaris 8 and have
much better feedback for this setup than putting everything into one
directory. And I consider this setup as "stable" because it surived
students here who have tried more than often to try to play "little
games" with other users.

> Based on my experience, if the aim is to reduce clutter in /tmp
> then this proposal will not do so.

See comment above about usabilty.

> And if there is a problem with
> applications leaving debris in $TMPDIR, then those applications
> should be fixed.

I agree with that, but this case is only about making the default shell
environment more user friendly...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to