The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

/tmp filling up 100%

Discussion in 'General Discussion' started by cz1179, Jan 8, 2005.

  1. cz1179

    cz1179 BANNED

    Joined:
    Dec 27, 2004
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    0
    I ran /scripts/securetmp last week and ever since the /tmp directory gets loaded almost daily. I have to go in and manually clear out the /tmp/logwatch*/ files shown below to get it back to normal 2% or so (it shoots up to 100% sometimes).

    How can I correct this?

    root@server [/tmp]# cd logwatch.OJp30518
    root@server [/tmp/logwatch.OJp30518]# dir
    (null) ./
    (null) ../
    (null) autorpm
    (null) clam-update
    (null) cron
    (null) exim
    (null) http
    (null) maillog
    (null) messages
    (null) pureftp
    (null) rt314
    (null) samba
    (null) secure
    (null) tac_acc
    (null) up2date
    (null) vsftpd
    (null) xferlog
    (null) yum

    I ran:
    /scripts/securetmp (originally)
    chmod -v 777 /tmp

    my /etc/fstab:
    LABEL=/ / ext3 defaults,usrquota 1 1
    LABEL=/boot /boot ext3 defaults 1 2
    none /dev/pts devpts gid=5,mode=620 0 0
    none /dev/shm tmpfs defaults 0 0
    none /proc proc defaults 0 0
    none /sys sysfs defaults 0 0
    /dev/hda3 swap swap defaults 0 0
    /dev/hdb1 /extra ext3 defaults 1 1

    Right now its only 2% full at 80k so total the /tmp is only 4MB. Someone suggestion to increase this. Is there a way to safely increase the partition for /tmp?
     
  2. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    Do you know if you have a separate partition for /tmp or if it's just a file mounted as a partition?

    In either case, 4MB is extremely tiny for the tmp size (as you've discovered)... mine is at 250 MB and it's kinda on the smallish size. On a more heavily loaded server, 500MB-1GB might be more appropriate.

    I'd highly recommend that you disable the securetmp script (it runs on every boot) and create a secure /tmp (and /var/tmp) mount manually (if your tmp is currently using a file and mounting it). You can find tutorials around that will walk you through this if you search for it. But if you're using a partition, it's going to be a bit more difficult to change.

    It looks like you might also need to set the sticky bit for /tmp....
    Code:
    chmod +t /tmp
    It's very important that you make sure that is set!
     
Loading...

Share This Page