1748169 Members
4097 Online
108758 Solutions
New Discussion юеВ

Re: enhanced ftp setup

 
Tapas Jha
Valued Contributor

enhanced ftp setup

Hi,

I am using hp-ux 11.0
We have few restricted ftp users in one of our server.
We want the enhanced ftp log for those users. How to configure it?
I have done but it's not logging for those users. In xferlog we can only see
the log for real user(not for restricted ftp user). We want the detailed log
(every details like login, remote ip, timestamp. how many bytes transfered, store, get , put...)
for restricted ftpuser in xferlog.
Pl.help.

Though i think if i put guest
log transfers anonymous,real,guest
inbound,outbound
in /etc/ftpd/ftpaccess file then restricted users entry will come. But i need details entry.

Below are my settings in Server.
Rgds
Tapas

/etc/passwd file entry:
resftp1:*:133:150:RESFTPUSR1 :/res1/./ftpdir:/usr/bin/ftpshell
resftp2:*:133:150:Restrcicted FTPUSR1:/res2/./ftpdir:/usr/bin/ftpshell

/etc/inetd.conf file entry:
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -a -u 000 -i -o

/etc/group file entry:
ftpusr::150:resftp1,resftp2,resftp3

Contents /etc/ftpd/ftpaccess is like below:
class all real,guest,anonymous *
guestgroup ftpusr
limit all 20 Any /etc/msgs/msg.dead
readme README* login
#readme README* cwd=/home/ftpusr
message /welcome.msg login
#message .message cwd=*
compress yes all
tar yes all
log commands real
log transfers anonymous,real inbound,outbound
shutdown /etc/shutmsg
# directory aliases... [note, the ":" is not required]
alias imp: /import
alias exp: /export
# cdpath
cdpath /export cdpath /import cdpath /master cdpatch /temp


In /var/adm/syslog/xferlog we can see for only real login like tapas
Fri Jun 11 11:42:12 2004 -1 X -1 X X X X X X ftp -1 X 1086934332 1.427734
Fri Jun 11 14:16:55 2004 -1 X -1 X X X X X X ftp -1 X 1086943615 0.048828
Fri Jun 11 14:17:17 2004 0.040183 199.40.47.205 110089 /home/tapas/test.txt a _
o r tapas ftp 0 * 1086943637 23338270216568818000000000000000.000000
Fri Jun 11 14:17:20 2004 0.053203 199.40.47.205 107532 /home/tapas/test1.txt1 a _
o r tapas ftp 0 * 1086943640 23338270216568818000000000000000.000000
Fri Jun 11 14:17:23 2004 -1 X -1 X X X X X X ftp -1 X 1086943643 0.171875

Tapas Jha
2 REPLIES 2
Robert-Jan Goossens
Honored Contributor

Re: enhanced ftp setup

Hi,

You could add the -v -L options to the ftpd in the /etc/inetd.conf. Check the ftpd man page for the descibtions.

In addition I would setup a seperate ftplog file instead of logging it all the syslog.

change the next line in the /etc/syslog.conf file.

*.info;mail.none;local5.none /var/adm/syslog/syslog.log
local5.info /var/adm/syslog/ftpd.log

local5 is used by ftpd.

Hope this helps,
Robert-Jan
Jose Mosquera
Honored Contributor

Re: enhanced ftp setup

Hi

Set up the following section into your /etc/ftpd/ftpaccess file:
# specify which group of users will be treated as "guests".
guestgroup

Also, in this file, verify the guest loggin setup:
log transfers anonymous,real,guest inbound,outbound

Then into your /etc/group file:
::999:resftp1,resftp2

And ensure that, at least, your ftp service definiton into /etc/inetd.sec have this options:
ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -a

To check any others options about ftpd loggin pls refer to "man ftpd"

Rgds.