FTP connection to NAS

Bill McFarland

Dabbler
Joined
Jan 14, 2019
Messages
13
How can I tell who and when someone is logged into my NAS and what they are doing or what they did?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
What do you mean by "logged into your NAS"?
 

Bill McFarland

Dabbler
Joined
Jan 14, 2019
Messages
13
I have some users set up to be able to ftp into my NAS and Download files... I would like to know when they log in and out and how much they downloaded per day... Is there away to do that with FreeNas?
 

l@e

Contributor
Joined
Nov 4, 2013
Messages
143
Check /var/log/xferlog maybe there some info.
 

l@e

Contributor
Joined
Nov 4, 2013
Messages
143
From shell use any editor or just tail or less commands.
 

Bill McFarland

Dabbler
Joined
Jan 14, 2019
Messages
13
I went to the shell and typed in the info above and it told me this:
bash: /var/log/xferlog: Permission denied
 

l@e

Contributor
Joined
Nov 4, 2013
Messages
143
less /var/log/xferlog
 

Bill McFarland

Dabbler
Joined
Jan 14, 2019
Messages
13
Got up the info but not what i'm looking for... I want to be able to see who logged on and for how long... I also want to be able to see how much data they transferred while they were on either in real time or past.. Is there away to do this?
Thanks Bill
 

l@e

Contributor
Joined
Nov 4, 2013
Messages
143
You can activate ssh under services and use putty but be careful that you don’t wreck the system.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Bill:

I see you are not getting the answers at the level you want. Allow me to be more explicit.

The built-in FTP in FreeNAS is proftpd (I tell you this in case you want to Google additional functionality you may find yourself interested in). In the FreeNAS configuration, it puts its events in /var/log/xferlog. In here, you will be able to see who logged in and what they transfered. Here is me, last night, ripping the last few episodes of my wife's Dawson's Creek DVD's and uploading them (lol embarrassing), this is what the xferlog looks like:
Code:
Feb 10 09:48:41 daneel proftpd[65630]: 127.0.0.1 (192.168.1.173[192.168.1.173]) - ROOT FTP login successful
Feb 10 09:48:41 daneel proftpd[65630]: 127.0.0.1 (192.168.1.173[192.168.1.173]) - USER root: Login successful.
Sun Feb 10 09:48:43 2019 2 192.168.1.173 272522900 /mnt/tank/media/TV_Shows/Dawson's_Creek/Season_6/S6E16_Dawson's_Creek.mp4 b _ i r root ftp 0 * c
Sun Feb 10 09:48:46 2019 2 192.168.1.173 333390339 /mnt/tank/media/TV_Shows/Dawson's_Creek/Season_6/S6E17_Dawson's_Creek.mp4 b _ i r root ftp 0 * c
Sun Feb 10 09:48:48 2019 2 192.168.1.173 249828909 /mnt/tank/media/TV_Shows/Dawson's_Creek/Season_6/S6E18_Dawson's_Creek.mp4 b _ i r root ftp 0 * c
Sun Feb 10 09:48:50 2019 2 192.168.1.173 260782135 /mnt/tank/media/TV_Shows/Dawson's_Creek/Season_6/S6E19_Dawson's_Creek.mp4 b _ i r root ftp 0 * c
Sun Feb 10 09:48:54 2019 3 192.168.1.173 371481288 /mnt/tank/media/TV_Shows/Dawson's_Creek/Season_6/S6E20_Dawson's_Creek.mp4 b _ i r root ftp 0 * c
Sun Feb 10 09:48:56 2019 2 192.168.1.173 315800070 /mnt/tank/media/TV_Shows/Dawson's_Creek/Season_6/S6E21_Dawson's_Creek.mp4 b _ i r root ftp 0 * c
Sun Feb 10 09:49:00 2019 3 192.168.1.173 404305431 /mnt/tank/media/TV_Shows/Dawson's_Creek/Season_6/S6E22_Dawson's_Creek.mp4 b _ i r root ftp 0 * c
Sun Feb 10 09:49:08 2019 7 192.168.1.173 899535081 /mnt/tank/media/TV_Shows/Dawson's_Creek/Season_6/S6E23-S6E24_Dawson's_Creek.mp4 b _ i r root ftp 0 * c
Feb 10 09:50:08 daneel proftpd[65630]: 127.0.0.1 (192.168.1.173[192.168.1.173]) - FTP session closed.


It won't be very convenient to try to see this in the built-in "shell" of FreeNAS, but you CAN do it. You can use "more", as in "more /var/log/xferlog". This will allow you to use spacebar to advance a page, and more importantly based on what you said, 'b' to go back a page.

Let me know if this helps you.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Good luck sir.
 
Top