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.

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:
    252
    Likes Received:
    2
    Trophy Points:
    18
    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,
     
  2. jasonhk

    jasonhk Well-Known Member

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

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    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