Operating System - HP-UX
1843980 Members
1908 Online
110226 Solutions
New Discussion

How can I redirect ftp log messages to other file?

 
Fred.Wu
Frequent Advisor

How can I redirect ftp log messages to other file?

How can I redirect logs related to ftp login and logout msg to other file?
Thanks
fred
7 REPLIES 7
Michael Tully
Honored Contributor

Re: How can I redirect ftp log messages to other file?

You can enable normal logging for ftp from inetd.conf, however you could get the logging moved to it's own file should you wish. 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 ?
Fred.Wu
Frequent Advisor

Re: How can I redirect ftp log messages to other file?

I tried, but not work, anyway, thanks,
any further idea?
fred
Michael Tully
Honored Contributor

Re: How can I redirect ftp log messages to other file?

Have a look at Jeff's suggestion in this posting.

http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=550369
Anyone for a Mutiny ?
Muthukumar_5
Honored Contributor

Re: How can I redirect ftp log messages to other file?

We have do it by using ftpd(aemon). We can redirect all ftp login,trasfer and logout messages by configuring ftpd on inetd.conf as,

ftpd -L -lv -o -i

It will redirect all messages and logs to /var/adm/syslog/xferlog log file.

Reconfigure the inetd as inetd -c and check now.
see ftpd man page for there optiongs.
Easy to suggest when don't know about the problem!
Geoff Wild
Honored Contributor

Re: How can I redirect ftp log messages to other file?

I had it done like this in 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 *

Unfortunately for me, that also moved all the cluster logging as well.

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.
Fabio Ettore
Honored Contributor

Re: How can I redirect ftp log messages to other file?

Hi Fred,

Michael gave the solution, just change the name of the log from /var/adm/syslog/ftp.log
to /var/adm/syslog/ftp.log.
Then ftp.log in ftplog without the dot.
This is an error that is in ITRC document too.
I had the same problem and wondered when I deleted the dot it worked for me!

Definitively Fred do all operations as Michael suggested with that change and it would work for you too.

Best regards,
Fabio
WISH? IMPROVEMENT!
Fabio Ettore
Honored Contributor

Re: How can I redirect ftp log messages to other file?

sorry, I wronged my post....
I mean change from /var/adm/syslog/ftp.log in /var/adm/syslog/ftplog

without dot.

Best regards,
Fabio
WISH? IMPROVEMENT!