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.

mounting on openvz

Discussion in 'Security' started by tiff2342, Nov 28, 2012.

  1. tiff2342

    tiff2342 Well-Known Member

    Joined:
    Apr 20, 2012
    Messages:
    140
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Is this the correct way to secure /tmp on an OpenVZ system?

    nano /etc/fstab
    and insert below lines,

    mount /dev/loop0 -o noexec,nosuid,rw /dev/tmpFS /tmp
    mount /dev/loop0 /dev/tmpFS -o noexec,nosuid,rw
    run command below,

    mount -obind,nosuid,noexec,nodev,rw /usr/tmp /tmp
    or is this the way to go? how do i make it mount like this on boot up?

    mount -t tmpfs -o noexec,nosuid tmpfs /tmp/
    mount -t tmpfs -o noexec,nosuid tmpfs /var/tmp/
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Just run /scripts/securetmp. You do not need to edit any files manually if you run it.
     
  3. tiff2342

    tiff2342 Well-Known Member

    Joined:
    Apr 20, 2012
    Messages:
    140
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    thought that does not work for openvz?
     

Share This Page