freelanceprogrammers.org Forum Index » PHP
Re: Virus Scanning
Joined: 18 May 2005
Posts: 18
Re: Virus Scanning
----- Original Message -----
From: "Abdul shahid khattak" <>
To: <php-objects@yahoogroups.com>
Sent: Monday, August 29, 2005 11:46 PM
Subject: [php-objects] Virus Scanning
> Can any body help? i want to scan the uploaded file in
> php code so that i can prompt user that the attached
> file is virus infected.
A few things to make it safer:
- Set the permissions of the upload directory to be as restrictive as
possible
- Don`t upload to a web accessible dir; upload to a `sandbox` directory
so you can do as many checks as you need to on the files before moving
them to their final destination
- $filename=preg_replace("/[^a-z0-9_-]/","_",$filename) or similar
before copying
- Make their final destination directory non executable by anyone if
possible
If you are running on a shared (virtual) server, your host provider may
already have anti-virus uploads turned on, check with them as it would
be a global thing.
If you have your own server, then you can install something like ClamAV,
which supports a lot of third party software:
http://www.clamav.net/3rdparty.html
Alternatively, Symantec has some nice offerings:
http://www.symantec.com/techsupp/enterprise/select_product_kb_nojs.html
A Google brings up this as well, looks good, not tested myself:
http://www.opswat.com/antivirussdk_server.shtml
A cheap solution, good if you are expecting just a few uploads a day, is
to allow the upload to a secure directory that has no permissions, then
download locally and have a scheduler run every 10 or 20 minutes for
viruses and if nothing found, then it`s good to go back to the server.
cheers,
Mark
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







