I'm using the built-in ftp server. Is there any way to monitor which users are logged in and what there are doing (in realtime)? Looking forward to your response.
Thx
maciana
|
|
|
Hi there,
I'm using the built-in ftp server. Is there any way to monitor which users are logged in and what there are doing (in realtime)? Looking forward to your response. Thx maciana
•
[6,299 views]
Hint Options
ftp logins via terminal
First off, I don't have a definitive answer for you, but here's a few thoughts until someone more knowledgeable comes along. I should add all the following comments apply to using the terminal. Maybe soon someone will write a nice GUI-based app to waikWbU0s...
- A lot of ftpd daemons don't really log all aspects of user activity all that well. For instance, it is possible to get a list of who logged in/out and when, but I guess it's generally considered bad form to spy on what files your users are sending/receiving.
- There *is* a rotating logfile (/var/log/ftp.log) that ostensibly tracks FTP user activity. But before you rush to run Console.app and have it watch this file or open a terminal window and leave it running with 'tail -f /var/log/ftp.log' I should add that:
1. It appears to just extract login/logout info from the /var/log/wtmp file. So at most you'll get the user and host names of your FTP 'guests' and when they logged in and out.
2. This file doesn't appear to be updated realtime. Actually I suspect it's just updated (daily?) by a periodic housekeeping cron job that merely parses the aforementioned wtmp file.
- If you're up to it, you might install a replacement FTP server like profptd (www.proftpd.org) which *does* log all sorts of stuff (who is on, what files they transferred, etc). However I would skip this unless you're comfortable with compiling apps under Unix (or just wait for some kind person to pre-build/port it to OSX)
- And finally, a partial solution for now -- open a terminal and try:
who /var/log/wtmp | grep "ftp"or maybe who /var/log/wtmp | grep "ftp" | tail -n 20if you have lots of visitors. At the very least it will show you who logged in and out recently. The downside is that unless you write a shell script or something it won't loop/repeat automatically. (Use the cursor-up key to repeat)
ftp logins via terminal
To see what someone is doing while logged in to your FTP server (not just the login info) you need to change a line in your /etc/inetd.conf file.
The line to change: ftp stream tcp nowait root /usr/libexec/tcpd ftpd -ll Notice the "-ll" at the end, that's the only thing you need to add. This tells the ftp server to log more information. You can then use the Console app to monitor the log file in real time. Hope this helps. - Iceberg
ftp logins via terminal
thanks for the hints - I basically need it to see if someone is connected and at what speed they are downloading/uploading. (i know that crush ftp is a good tool but i don't really need that much... i prefer learning a bit about unix rather than spending money for the easy way ;-) )
ftp (or AppleShare) logins via terminal
Slightly offtopic... |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.25 seconds |
|