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.

/var /tmp

Discussion in 'General Discussion' started by abusedreality, Sep 9, 2003.

  1. abusedreality

    abusedreality Well-Known Member

    Joined:
    Apr 15, 2003
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I am trying to secure my server, as hackers have been having a bit of fun with it at the moment, by putting files in /tmp and running them has taken my cpu upto 440 .

    Anyway,

    Two ways to protect are to...

    partition /tmp and enable noexec, how would i do this, I tried following a how to, but it crashed mysql as it got a permission denied every 3 seconds.

    symlink /var/tmp to /tmp, whats the code for this and do you reccommend it,

    Thanks for your help

    cPanel.net Support Ticket Number:
     
  2. Elikster

    Elikster Well-Known Member

    Joined:
    Feb 8, 2003
    Messages:
    119
    Likes Received:
    1
    Trophy Points:
    18
    Greetings,

    You use parted to resize the last partition to make some space, around 50 to 100 megs, which is more than sufficient for this purpose. Once you made it and formatted it, set it in the /etc/fstab the line with noexec. Then, after mounting it on /tmp point, chmod the tmp with 777 and then +t. That will set it to what original /tmp is. Then you need to symlink the mysql.sock back in the /tmp with this command:

    ln -s /var/lib/mysql/mysql.sock mysql.sock

    For the /var/tmp to tmp, delete the /var/tmp and then do this: ln -s /tmp tmp

    That is all to it.

    cPanel.net Support Ticket Number:
     
  3. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    You need to find out how the hackers are getting in, there are plenty of 777 perm dirs on your server i'm sure they could store this stuff in.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page