[CentOS] Tmp directory and sticky

Mon Sep 15 20:11:24 UTC 2008
Filipe Brandenburger <filbranden at gmail.com>

Hi Bob,

On Mon, Sep 15, 2008 at 02:18, Bob Hoffman <bob at bobhoffman.com> wrote:
> I noticed after my install that the tmp directory was
> A- not a sticky

Then there must be something wrong with your install, because all
stock installs of CentOS I have done so far will create /tmp as sticky
directory.

> B- still executable

You mean permissions? chmod +x? Because it is supposed to have
executable permissions.

If you mean mounted with noexec, that's different, that's something
that is not done by default on CentOS. That is something that can be
done only if /tmp is created as a separate partition, but that is not
something that everybody does, and I think the default partitioning in
CentOS is to keep /tmp on the root filesystem. There are advantages
and disadvantages to both approach, you should choose yours.

By the way, to do it by default, this is what I use in the ks.cfg I
use to kickstart install my machines:

logvol /tmp --vgname=raidvol --name=tmp --size=4096 --fstype=ext3
--fsoptions="nodev,nosuid,noexec"

I'm still concerned with the fact that you said on your install it was
not sticky, because on all my installs, even if I create /tmp as a
different filesystem with fsoptions, it is created as a sticky
directory. Could you re-check that please?

Filipe