We know that viruses and other threats can propagate through mail etc.But when any resource is shared,it is uploaded to the server and then shared.This means that the server does not take the responsibility of cleaning the uploaded files of viruses.Then how does it ensure self defense and secure the resources present on it and various services running on it?

  • Keep the admin from looking at shared content. One exploited Doc, PDF, etc. and the game is over. – Randy Abrams Aug 27 '14 at 22:39

The server should do validation on the user submitted file. E.g. If you allow the user to upload an image file for their profile picture, you should make sure that the file is a JPEG or PNG file and not an EXE file.

More info : http://www.waytocode.com/2012/file-uploading-validation-in-php/

If you are running a file sharing service and allow all types of files to be uploaded. Even if a malicious file to be uploaded, it will not infect your system as long as you do not execute it. For added security, set the executable flag to be off so that it cannot be executed through any means.

| improve this answer | |
  • "it will not infect your system as long as you do not execute it." I disagree. Some malware takes advantage of renderers. It doesn't have to be an EXE and doesn't have to be executed. – Jeff-Inventor ChromeOS Aug 28 '14 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.