LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-18-2013, 06:06 PM   #1
yanger
Member
 
Registered: Jun 2004
Location: Wisconsin
Distribution: Ubuntu, Gentoo, FreeBSD, Solaris
Posts: 55

Rep: Reputation: 16
How can I find out what's accessing my ftp from localhost?


Quote:
krondor:/var/log# tail messages
Mar 18 17:34:49 krondor -- MARK --
Mar 18 17:45:02 krondor pure-ftpd: (?@127.0.0.1) [INFO] New connection from 127.0.0.1
Mar 18 17:45:02 krondor pure-ftpd: (?@127.0.0.1) [INFO] Logout.
Mar 18 18:14:49 krondor -- MARK --
Mar 18 18:34:49 krondor -- MARK --
Mar 18 18:54:49 krondor -- MARK --
Mar 18 18:55:01 krondor pure-ftpd: (?@127.0.0.1) [INFO] New connection from 127.0.0.1
Mar 18 18:55:01 krondor pure-ftpd: (?@127.0.0.1) [INFO] Logout.
Mar 18 19:00:01 krondor pure-ftpd: (?@127.0.0.1) [INFO] New connection from 127.0.0.1
Mar 18 19:00:01 krondor pure-ftpd: (?@127.0.0.1) [INFO] Logout.
I'm uncertain how to figure out what's causing this from showing in the log. I've looked through processes, crontabs, etc, and can't seem to find anything trying to access ftp... hope i posted in the right spot too... been a long time since i've been here...
 
Old 03-18-2013, 07:15 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Going by the time stamps, it looks like some sort of health check that's running at 5 minute slots .. check 'cron' and 'at' to see what you can find. Do you have anything like nagios?

Last edited by kbp; 03-18-2013 at 07:16 PM.
 
Old 03-18-2013, 08:20 PM   #3
yanger
Member
 
Registered: Jun 2004
Location: Wisconsin
Distribution: Ubuntu, Gentoo, FreeBSD, Solaris
Posts: 55

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by kbp View Post
Going by the time stamps, it looks like some sort of health check that's running at 5 minute slots .. check 'cron' and 'at' to see what you can find. Do you have anything like nagios?
went through each user via crontab -l -u and no one is running a 5 minute cron.

noticed though that cron was kinda borked?
Quote:
# cron
cron: can't lock /var/run/crond.pid, otherpid may be 1686: Resource temporarily unavailable
at is not installed

/etc/cron* has nothing with a 5 minute timer..
 
Old 03-18-2013, 09:00 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Maybe increase the logging 'VerboseLog yes' and restart the daemon, that should tell you the user logging in and any commands performed.
 
1 members found this post helpful.
Old 03-18-2013, 11:16 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You can see from the log what time the next run is due. Why not run top just before that and just keep an eye on it. The process should show up (even if only briefly).
Another option is to use top's batch mode to automate that check; after few runs you should catch it in action.
 
1 members found this post helpful.
Old 03-22-2013, 08:18 AM   #6
yanger
Member
 
Registered: Jun 2004
Location: Wisconsin
Distribution: Ubuntu, Gentoo, FreeBSD, Solaris
Posts: 55

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by kbp View Post
Maybe increase the logging 'VerboseLog yes' and restart the daemon, that should tell you the user logging in and any commands performed.
got this now.. i found a batch of stuff running every 5 minutes maybe from one cron that i cannot find ;\

Code:
Mar 22 09:10:01 krondor /USR/SBIN/CRON[32707]: (getmail) CMD (/usr/local/bin/run-getmail.sh > /dev/null 2>> /var/log/ispconfig/cron.log)
Mar 22 09:10:01 krondor /USR/SBIN/CRON[32706]: (www-data) CMD ([ -x /usr/lib/cgi-bin/awstats.pl -a -f /etc/awstats/awstats.conf -a -r /var/log/apache/access.log ] && /usr/lib/cgi-bin/awstats.pl -config=awstats -update >/dev/null)
Mar 22 09:10:01 krondor /USR/SBIN/CRON[32708]: (root) CMD (/usr/local/ispconfig/server/server.sh > /dev/null 2>> /var/log/ispconfig/cron.log)
Mar 22 09:10:01 krondor pure-ftpd: (?@127.0.0.1) [INFO] New connection from 127.0.0.1
Mar 22 09:10:01 krondor pure-ftpd: (?@127.0.0.1) [DEBUG] Command [quit] []
Mar 22 09:10:01 krondor pure-ftpd: (?@127.0.0.1) [INFO] Logout.
Mar 22 09:10:01 krondor postfix/smtpd[32691]: connect from localhost.localdomain[127.0.0.1]
Mar 22 09:10:01 krondor postfix/smtpd[32691]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Mar 22 09:10:01 krondor postfix/smtpd[32691]: disconnect from localhost.localdomain[127.0.0.1]
Mar 22 09:10:01 krondor dovecot: pop3-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Mar 22 09:10:01 krondor dovecot: imap-login: Disconnected: rip=127.0.0.1, lip=127.0.0.1, secured
Quote:
Originally Posted by chrism01 View Post
You can see from the log what time the next run is due. Why not run top just before that and just keep an eye on it. The process should show up (even if only briefly).
Another option is to use top's batch mode to automate that check; after few runs you should catch it in action.
I tried this, lol, so hard to find a process that connects and then disconnects within the second.. especially on a cloud server...

atm, i am going to ignore it, it doesn't look bad.. was thinking i could clean up my logs by finding and stopping this, but it may be part of how ispconfig works.. [apparently, it's ispconfig]

Last edited by yanger; 03-22-2013 at 08:19 AM. Reason: adjusted quotes...
 
Old 03-23-2013, 02:10 AM   #7
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Quote:
Mar 22 09:10:01 krondor pure-ftpd: (?@127.0.0.1) [INFO] New connection from 127.0.0.1
Mar 22 09:10:01 krondor pure-ftpd: (?@127.0.0.1) [DEBUG] Command [quit] []
Mar 22 09:10:01 krondor pure-ftpd: (?@127.0.0.1) [INFO] Logout.
Yep .. looks exactly like a health-check, doesn't do anything other than confirm ftp is up and running
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem accessing localhost mysql in Ubuntu 11.10 Apache Locally thrash44 Linux - Newbie 1 11-09-2011 11:29 AM
Accessing from Internet to daemon binded to localhost h725 Linux - Networking 2 03-11-2009 03:52 PM
Accessing FTP site using FTP Clients s/w on XP machines. munirg2003 Linux - Security 5 06-26-2007 02:36 AM
Object not Found error when accessing localhost. calculemus Linux - Networking 6 10-22-2006 10:52 PM
Samba problem with accessing localhost:901 rcj2 Linux - Networking 27 11-28-2005 07:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:58 AM.

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