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.

is this command safe

Discussion in 'General Discussion' started by charliesxia, Apr 6, 2010.

  1. charliesxia

    charliesxia Member

    Joined:
    Aug 3, 2006
    Messages:
    18
    Likes Received:
    1
    Trophy Points:
    0
    Hello,
    I need to run some exec program install on the tmp
    and i search the google found this
    mount -o remount,exec,suid /tmp
    mount -o remount,exec,suid /var/tmp

    Is these command right?
    and how to restore the tmp setting back after i finnished the install

    Can anyone help?:):eek:

    Thank you.
     
  2. rachelm

    rachelm Well-Known Member

    Joined:
    Jan 26, 2005
    Messages:
    94
    Likes Received:
    1
    Trophy Points:
    8
    it won't kill your server but I wouldn't leave it like that too long or it's a big security loophole.

    To change it back after do:

    mount -o remount,noexec,nosuid /tmp
    mount -o remount,noexec,nosuid /var/tmp

    you can also run /scripts/securetmp which should have the same effect as the above commands.
     
  3. charliesxia

    charliesxia Member

    Joined:
    Aug 3, 2006
    Messages:
    18
    Likes Received:
    1
    Trophy Points:
    0
    thank you for your help.
    I install the program successfully:)
     
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    I know of no legitimate reason to directly execute any script from /tmp and there are much better ways to handle that than remounting as executable which is not recommended and very dangerous security wise.
     
Loading...

Share This Page