Current time: 12-24-2024, 05:27 AM Hello There, Guest! (LoginRegister)


Post Reply 
Add proftp xferlog to MySQL
Author Message
Lordek Offline
Junior Member
*

Posts: 22
Joined: May 2008
Reputation: 0
Post: #1
Add proftp xferlog to MySQL
Hi!

I am triying to write the proftpd log in a table.

I have created the following table with this sql expression:

Code:
CREATE TABLE `ftpxferlog` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `username` VARCHAR(30) NOT NULL DEFAULT '',
  `filename` text,
  `size` bigint(20) DEFAULT NULL,
  `host` tinytext,
  `ip` tinytext,
  `action` tinytext,
  `duration` tinytext,
  `localtime` timestamp NULL DEFAULT NULL,
  `success` BOOL NOT NULL DEFAULT '0',
  PRIMARY KEY  (`id`),
  KEY `idx_usersucc` (`username`, `success`)
)

and i have added in /etc/proftpd/proftpd.conf the following lines at bottom
Code:
# xfer log in mysql
SQLLog RETR,STOR transfer1
SQLNamedQuery transfer1 INSERT "NULL, '%u', '%f', '%b', '%h', '%a', '%m', '%T', now(), '1'" ftpxferlog

SQLLOG ERR_RETR,ERR_STOR transfer2
SQLNamedQuery transfer2 INSERT "NULL, '%u', '%f', '%b', '%h', '%a', '%m', '%T', now(), '0'" ftpxferlog

But I check with pma and nothing is added. The connection trought mysql is well configured (i've keep it by default).

Why proftpd doesn't add rows to the table?

PD: sorry for my poor english ._.U
(This post was last modified: 05-03-2008 07:11 PM by Lordek.)
05-03-2008 07:08 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)