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.

How to set retraction on uploading file type or extensions?

Discussion in 'Security' started by nazrul, Jul 2, 2012.

  1. nazrul

    nazrul Registered

    Joined:
    Jul 2, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    I want to limit only files with approved extensions such as ".gif", ".jpeg", ".doc", etc. are allowed to be uploaded to the web server. This is vitally important for my server's security, since the web server might attempt to execute or specially process files with extensions like ".php", ".cgi", etc.

    Anybody can advice how and where can I set / configure to set restriction to upload file according to below Logic:

    # Deny All File extension
    # Except : .gif , .jpg , .pdf , .png.

    Any help is highly appreciated.
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Does the machine have mod_security on it? There might be a way to do this via mod_security, but I thought it prevented by naming the file type rather than denying all but for a list that is allowed.
     
Loading...

Share This Page