777 and 773 - how can I tighten security?

Discussion in 'Security' started by Kerosene, Jul 3, 2007.

  1. #1
    I'm working on a site that requires a 777 folder to use as a cache.
    It also work as 773 - but anything else breaks the entire site.

    Just how unsafe is a 773 directory?
    The directory is emptied each night (cronjob) if that makes any difference.

    And considering I can't change the script that uses this 773 directory, is there any other way I can tighten security?
     
    Kerosene, Jul 3, 2007 IP
  2. eukvps

    eukvps Guest

    Messages:
    56
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Even with 773 you are making that folder as world writable , so it is as dangerous as 777.

    In this case nothing can be done other than monitoring that directory , only one thing can be done.

    Place that directoy in home directory same level your public_html exists, so even if they are able to upload files it will be very dfficult for them to run script uploaded in that folder.

    Regards,

    Arun K
    ---------------------
    http://www.eukvps.com
    Cheap & Reliable VPS Hosting
     
    eukvps, Jul 4, 2007 IP
    Kerosene likes this.
  3. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #3
    Good suggestion - thanks. Just how safe is it having them at same level as public_html? Safe enough for me to consider the security issue 'solved'?

    To change the cronjob once I move the directory, do I just change
    rm -rf /home/accountname/public_html/mydirectory/*
    to
    rm -rf /home/accountname/mydirectory/*
     
    Kerosene, Jul 4, 2007 IP
  4. eukvps

    eukvps Guest

    Messages:
    56
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yes just change path of directory, and it is more safer than putting it some where under public_html as any one can target directory directly. So security problem can be 97% solved.

    Use rm -rf /home/accountname/mydirectory/*

    Hopefully that should resolve your issue.

    Regards,

    Arun K
    ----------------------
    http://www.eukvps.com
    Cheap & Reliable VPS Hosting
     
    eukvps, Jul 4, 2007 IP
  5. Mxhub

    Mxhub Active Member

    Messages:
    474
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #5
    set as 755, at least. best is 700 if you are the only one using that file.
     
    Mxhub, Jul 8, 2007 IP