Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've noticed that one system user is constantly downloading a single JPEG file (every few seconds) via FTP server. The source IP is actually assigned to the server itself. I've tried to use tools like lsof, ps, top. I've also checked the cron jobs with no luck. Could you please advise how I can trace the source of this process, script? Please note that this server is running cPanel.

I could use strace however the process is not running long enough to catch it.

# tail /var/log/xferlog
    Wed Jan 23 14:21:26 2013 0 14558 /path_to_dir/file.jpg b _ o r user ftp 1 * c
    Wed Jan 23 14:21:26 2013 0 14558 /path_to_dir/file.jpg b _ o r user ftp 1 * c
    Wed Jan 23 14:21:27 2013 0 14558 /path_to_dir/file.jpg b _ o r user ftp 1 * c
share|improve this question
up vote 5 down vote accepted

You could temporarily replace that file with a much larger file, or a FIFO (see mkfifo command) and then look for that process again.

share|improve this answer
this is a great idea that I never thought of. perhaps a symlink to /dev/random would work if pureftpd follows symlinks. Then it will be held indefinitely. You would of course need to kill the process fairly quickly or you might run out of memory. – drone.ah Jan 23 '13 at 15:28

You can use -f option of strace for tracing child processes. Get pid of suspicious process, then execute strace -f -p pid -o /tmp/strace.log. You should search "connect" or "RETR" keyword.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.