LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-14-2005, 12:53 PM   #1
FirmbIT
LQ Newbie
 
Registered: Oct 2005
Posts: 27

Rep: Reputation: 15
PHP upload logging?


I'm trying to lock down a lot of things in our PHP/Apache based servers, such as accurately logging all the avenues someone can use to place a file in their account.
For example,
1. wrappers around wget, curl, lynx, etc
2. Additional control panel logging with regards to uploads
3. Verbose FTP logs

One thing I can't seem to find is a way to log all the files that are handled by PHP's upload functions. I just want it to write to a certain file whenever these things are done.
A daemon will be running to monitor all upload-related logfiles, to perform scans on the contents and hash-based matches against known malicious file signatures.

This is all great, but I really don't know how to get php to log uploads unless I get down and dirty with the source code.

I guess I could make a mod_security rule that checks POST submissions, tries to determine if a file is being uploaded, maybe invokes the file checking daemon, and silently logs it, but I dunno.

Anyone have any ideas?
 
Old 12-14-2005, 01:44 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
I can't think of any way to do that without hacking the code, which should be simple, though might incur a lot of overhead (fopen/write/fclose).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Php Upload Files rabee77 Linux - Software 1 01-16-2005 05:26 AM
Upload Script....but not php vous Programming 1 02-04-2004 02:13 PM
ftp upload in php raven Programming 2 07-07-2002 05:33 PM
File upload via PHP saravanan1979 Programming 1 02-14-2002 04:28 AM
File upload via PHP!!! saravanan1979 Programming 0 02-14-2002 01:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration