1833758 Members
2336 Online
110063 Solutions
New Discussion

Separate ftp log

 
M. Tariq Ayub
Regular Advisor

Separate ftp log

Hi,

I want to create a separate log file that will only have ftp related log. I donot want ftp information to be in the syslog.log.

What changes do i need to do in syslog.conf or in any other configuration file.

Tariq
7 REPLIES 7
Sanjay Kumar Suri
Honored Contributor

Re: Separate ftp log

I don't think it is possible through changes in configuration file.

You can do the following periodically and redirect the output to some file.

grep "FTP" syslog.log

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Michael Tully
Honored Contributor

Re: Separate ftp log

All you need do is change the syslog.conf file and away you go.

Add this to /etc/syslog.conf

local5.info;mail.none /var/adm/syslog/ftp.log

Then get syslogd to re-read it's config.

# kill -HUP `cat /var/run/syslog.pid`

Anyone for a Mutiny ?
M. Tariq Ayub
Regular Advisor

Re: Separate ftp log

Hi,

This will create all entries to ftplog? I donot want to do that. I want only ftp entries will go to ftplog and all other entries will go to syslog like now.

Tariq
Hoefnix
Honored Contributor

Re: Separate ftp log

Hi,

No not all syslog messages will go to this log, only local5 messages.
I tried to find a link with the spec of all local0 .. local7 entries you can use, but without succes.(read also the manpage of syslog)
I assume what the previous post does is, route all the messages from ftpd (or from inetd?) to the new logfile.
So other messages are still logged to syslog.log.

HTH,
Peter
Sanjiv Sharma_1
Honored Contributor

Re: Separate ftp log

Hi Tariq,

Please check this link:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=214847

hth.
Everything is possible
Geoff Wild
Honored Contributor

Re: Separate ftp log

ftp is a daemon - I did it like this in my /etc/syslog.conf:

# @(#)B.11.11_LR
#
# syslogd configuration file.
#
# See syslogd(1M) for information about the format of this file.
#
mail.debug /var/adm/syslog/mail.log
daemon.info;mail.none /var/adm/syslog/daemon.log
*.info;mail.none,daemon.none /var/adm/syslog/syslog.log
*.alert /dev/console
*.alert root
*.emerg *


However - that will log all daemons - including MC/SG....

After changes, make syslogd re-read the file:

kill -HUP `cat /var/run/syslog.pid`

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Jeff Schussele
Honored Contributor

Re: Separate ftp log

Hi Tariq,

You can keep records of all files received & transmitted by the ftp server by using -i & -o on the ftpd command line in /etc/inetd.conf.
File logged to would be /var/adm/syslog/xfer.log

You can also enable the same functionality by making the following entries in the /etc/ftpd/ftpaccess file:

log commands real
log transfers anonymous,real inbound, outbound

The connections themselves would still be recorded in syslog.log, but the actual ftpd actions will be in xfer.log

man ftpd, ftpaccess, & xferlog for further details.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!