Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How To Increase size of /var/tmp and /tmp ?

Discussion in 'General Discussion' started by Divvy, Oct 16, 2013.

  1. Divvy

    Divvy Member

    Joined:
    Jul 10, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    151
    Hi cPanel team,

    Can someone help me?
    How can I increase the space of /var/tmp and /tmp ?
    I have only 512MB and is not enough because the tmp partition goes full when the scheduled backup runs.

    I tried this tutorials:
    http://forums.cpanel.net/f5/drive-critical-dev-loop0-var-tmp-97-full-190772.html
    /http://blog.shineservers.com/how-to-increase-size-of-vartmp-and-tmp-centos/

    But without luck...

    My securetmp content after running the command:
    vi /usr/local/cpanel/scripts/securetmp
    Code:
    #!/usr/local/cpanel/3rdparty/bin/perl
    # cpanel - scripts/securetmp Copyright(c) 2012 cPanel, Inc.
    # All rights Reserved.
    # copyright@cpanel.net http://cpanel.net
    # This code is subject to the cPanel license. Unauthorized copying is prohibited
    
    use strict;
    use Cpanel::SafeFile ();
    use Cpanel::OSSys ();
    use Cpanel::Filesys ();
    use Cpanel::DiskLib ();
    use Getopt::Long;
    use Cpanel::Logger ();
    use Cpanel::SafeRun::Errors ();
    use Cpanel::SafeRun::Simple ();
    
    my $logger = Cpanel::Logger->new();
    
    $| = 1;
    
    if ( -e '/var/cpanel/version/securetmp_disabled' ) {
    print "[securetmp] Disabled per /var/cpanel/version/securetmp_disabled\n";
    exit;
    "/usr/local/cpanel/scripts/securetmp" 681L, 21312C

    Can someone give me a little help?

    Thanks :)

    Best regards,
    Tim
     
    #1 Divvy, Oct 16, 2013
    Last edited: Oct 16, 2013
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,478
    Likes Received:
    421
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    It seems to me that you've made a mess of that file. Did you back it up before modifying it? As mentioned by cPanelTristan, you're only modifying one line in the file. This one:
    And then you save file.

    Once you've edited that one line, and saved the file, you run the rest of the steps.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    The securetmp script will utilize 1% of disksize with a minimum of 500M and a maximum of 4G, based on the available space on the /usr partition (where the tmpDSK file is stored). You are welcome to manually create a /tmp partition if you prefer to use a larger size.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Divvy

    Divvy Member

    Joined:
    Jul 10, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    151
    Thank you guys! :)
     
  5. Divvy

    Divvy Member

    Joined:
    Jul 10, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    151
    Hi guys,

    Thank you for your reply and for trying to help me.

    The problem is that I cant find the line to edit:
    $tmpdsksize = 512000;

    Using the command:
    # nano /usr/local/cpanel/scripts/securetmp
    Or
    # pico /scripts/securetmp

    Where could this line be hidden!? Any ideas?

    Thanks!

    Best regards,
    Tim
     
  6. cgimickalo

    cgimickalo Well-Known Member

    Joined:
    Apr 19, 2013
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    N.W. Iowa
    cPanel Access Level:
    Root Administrator
    We did this a while back to decrease the /var/tmp size. All I did was download the securetmp script, besure to download it as ASCII Text format, then look for the setting $tmpdsksize = 512000 should be around line 148 or 150. Edit the file as a text file, save it in a UNIX or Text format, then upload it back to folder it's keep in the ASCII Text format & besure it's executable. Then simple execute the script and answer the 2 questions w 'y' if I remember correctly. That should do it.

    Mike
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. gopkris2005

    gopkris2005 Well-Known Member

    Joined:
    Jan 9, 2007
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    You can also do ssh...
    Login ssh via root user
    #vi /scripts/securetmp
    Search that key
    :/tmpdsksize
    Change values and save
    :wq
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #7 gopkris2005, Oct 18, 2013
    Last edited: Oct 18, 2013
  8. Divvy

    Divvy Member

    Joined:
    Jul 10, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    151
    Thank you guys!

    The problem was me... I forgot to scroll down the file lol :)
    Btw, I changed to 10GB but only appears 4GB. Is 4GB the maximum size that $tmpdsksize can handle?

    I need a bigger value because tmp partition goes full when the scheduled backup runs. I think that is because Im using the remote ftp. Is there any alternative solution for me?

    Thanks!
     
  9. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yes, please see my previous post:

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. zestylemon

    zestylemon Member

    Joined:
    Jul 19, 2010
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    51
    Hi Michael,

    It would be appreciate if you would please post instructions on how to do this as I've searched but not yet found any thing.

    Thanks :)
     
    #10 zestylemon, Feb 14, 2014
    Last edited by a moderator: Feb 14, 2014
  11. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Manually modifying the size of the tmp partition is an OS procedure if you are not using the /scripts/securetmp application. You can find instructions by searching for a term such as "Resize tmp OS" on a search engine. Replace "OS" with the actual name of the OS you are using.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice