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!

value for upload_tmp_dir

Discussion in 'General Discussion' started by Kailash1, Jun 21, 2009.

  1. Kailash1

    Kailash1 Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    253
    Likes Received:
    2
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi,

    What should we set for upload_tmp_dir in php.ini for shared hosting server (suPHP disabled)?

    Thanks,
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. jasonhk

    jasonhk Well-Known Member

    Joined:
    Nov 11, 2005
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    156
    I think it's normally blank and defaults to /tmp
     
  3. PlatinumServerM

    PlatinumServerM Well-Known Member
    PartnerNOC

    Joined:
    Jul 10, 2005
    Messages:
    400
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    New Jersey, USA
    cPanel Access Level:
    Root Administrator
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    8
    Trophy Points:
    193
    While on the issue of /tmp, something worth noting not so much
    for you as much as for the benefit of everyone reading this thread ....

    Most servers generally have /tmp setup incorrectly for security
    by default and this is one of the largest and most exploited
    security holes that is ironically most often overlooked when
    most people try to harden the security on their servers.

    The good news is this is an easy issue to fix ...

    Though it doesn't always work, cpanel provides a script that may help:
    Code:
    # /scripts/securetmp 
    
    Would you like to secure /tmp & /var/tmp at boot time? (y/n) y
    Would you like to secure /tmp & /var/tmp now? (y/n) y
    
    It is a good idea to double check things ...

    1. Edit your /etc/fstab file and look for the line that says "/dev/shm"
    and you may see something like the following:
    Code:
    tmpfs     /dev/shm       tmpfs   [b]defaults[/b]   0 0
    If it isn't already set as below, change the line to the following:
    Code:
    tmpfs     /dev/shm       tmpfs   [b]noexec,nosuid[/b]   0 0
    2. Remount the partition ('mount -o remount /dev/shm')
     
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