Portal Home > Knowledgebase > Articles Database > detect uploaded file and notify admin ?


detect uploaded file and notify admin ?




Posted by ttgt, 08-10-2013, 05:15 AM
Hi, because i do not allow my users to upload mp3 or iso or too big file to my server, but there is still some people upload it via ftp or cpanel, is any way to detect those files automatically and my server will notify admin(me) directly ? thanx

Posted by Mark Muyskens, 08-10-2013, 05:20 AM
Searching for files over 50MB sounds reasonable in this case. http://www.cyberciti.biz/faq/find-large-files-linux/

Posted by AcidMind, 08-10-2013, 05:57 AM
Mark Muyskens: I totally agree. If you are familiar with Linux Shell Scripting, then try to implement a script to check for files larger than 50 Mb using the links from Mark and send a notification to admin mail account. When the script is ready use cron to schedule file checking every xx:xx time that suits you. crontab configuration example: pantz.org/software/cron/croninfo.html

Posted by ttgt, 08-10-2013, 11:16 AM
but will it not take alot system resource to check it ?

Posted by lynxus, 08-10-2013, 11:28 AM
Not really. Especially if you use find and tell it the directory to search in ( rather than your whole machine )

Posted by fshagan, 08-10-2013, 01:16 PM
You can get most of this by using ConfigServer.com's CXS (exploit scanner). It allows you to block, quarantine and/or be alerted when files are uploaded via pureftp, php, perl or cgi. I believe the one "hole" that remains is a cPanel File Manager upload, but you can enable periodic scans that will report files with a certain extension (mp3, etc.).



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
GNAX down? (Views: 700)
rm -rf command help (Views: 688)
eNom Reseller (Views: 671)

Language: