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 prevent rm -rf * or rm -rf / from executing?

Discussion in 'Data Protection' started by ottdev, Apr 10, 2015.

  1. ottdev

    ottdev Well-Known Member

    Joined:
    Oct 1, 2013
    Messages:
    118
    Likes Received:
    4
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I'm sure someone must have asked in these forums before, but search is ignoring the string rm -rf (too short/common) so I am not finding relevant results.

    I believe it has something to do with bash rc
    Can anyone point me to current correct instructions for CPanel servers ?
     
  2. madmanmachines

    madmanmachines Well-Known Member

    Joined:
    Nov 28, 2014
    Messages:
    94
    Likes Received:
    4
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    HI,

    The best is to just be careful not to execute as there are many commands to accomplish the same result. You won't be able to block all methods to destroy your machine. If you are still nervous you may accidentally remove directories, you can try safe-rm:
    --
    launchpad.net/safe-rm
    --

    Thanks,
     
    #2 madmanmachines, Apr 13, 2015
    Last edited by a moderator: Apr 14, 2015
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,167
    Likes Received:
    1,933
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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