LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-19-2022, 12:28 PM   #1
relina
LQ Newbie
 
Registered: Apr 2022
Posts: 3

Rep: Reputation: 0
log ftp files


Hello good morning

I'm trying to make a script or something to keep track of what users upload to a vftp server

I don't know if you could help me
 
Old 04-19-2022, 01:00 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,650

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by relina View Post
Hello good morning
I'm trying to make a script or something to keep track of what users upload to a vftp server I don't know if you could help me
We absolutely can help you; if you'd like a script, then you need to post what YOU have written/done/tried on your own. Read the "Question Guidelines" link in my posting signature. We're happy to help if you're stuck, but we aren't going to write scripts for you.

Beyond that, there are many guides on how to enable verbose logging for a VSFTPD server. You don't say what version/distro of Linux you're using, or version of VSFTPD, but things like this:
Code:
xferlog_enable=YES
xferlog_std_format=NO
xferlog_file=/var/log/vsftpd.log
log_ftp_protocol=YES
..may be all you need. Look at the vsftpd configuration pages for explanations on those options and what they do on your version.
 
1 members found this post helpful.
Old 04-19-2022, 04:09 PM   #3
relina
LQ Newbie
 
Registered: Apr 2022
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
We absolutely can help you; if you'd like a script, then you need to post what YOU have written/done/tried on your own. Read the "Question Guidelines" link in my posting signature. We're happy to help if you're stuck, but we aren't going to write scripts for you.

Beyond that, there are many guides on how to enable verbose logging for a VSFTPD server. You don't say what version/distro of Linux you're using, or version of VSFTPD, but things like this:
Code:
xferlog_enable=YES
xferlog_std_format=NO
xferlog_file=/var/log/vsftpd.log
log_ftp_protocol=YES
..may be all you need. Look at the vsftpd configuration pages for explanations on those options and what they do on your version.
thank you,

Of course, of course, I don't want them to write the script for me, but to guide me a bit because I don't know where to start, I have fairly good knowledge of bash but of no other language (ok bash is not a language as such)

I don't know whether to do a continuous tail to the atuh.log file and when X users connect, do an ls -l to that user's directory... but the truth is that it seems to me something very rudimentary... but I don't have a programmer mentality

oh and answering your questions my vsftpd is 3.0.3 and my distro is debian 10
 
Old 04-19-2022, 04:28 PM   #4
relina
LQ Newbie
 
Registered: Apr 2022
Posts: 3

Original Poster
Rep: Reputation: 0
Also say that on my server they connect through ftp but that they are caged users because the connections, although they are through an ftp for the users, are actually ssh since they are configured in the /etc/ssh/sshd_conf file with something like this:
Match user USER
Chroot Directory /mnt/ftp/USER
AllowTcpForwarding no
ForceCommand internal-sftp
Password Authentication yes

Last edited by relina; 04-19-2022 at 04:29 PM.
 
Old 04-19-2022, 05:34 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,650

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by relina View Post
thank you,
Of course, of course, I don't want them to write the script for me, but to guide me a bit because I don't know where to start, I have fairly good knowledge of bash but of no other language (ok bash is not a language as such)

I don't know whether to do a continuous tail to the atuh.log file and when X users connect, do an ls -l to that user's directory... but the truth is that it seems to me something very rudimentary... but I don't have a programmer mentality oh and answering your questions my vsftpd is 3.0.3 and my distro is debian 10
...and...
Quote:
Originally Posted by relina
Also say that on my server they connect through ftp but that they are caged users because the connections, although they are through an ftp for the users, are actually ssh since they are configured in the /etc/ssh/sshd_conf file with something like this:
Code:
Match user USER
Chroot Directory /mnt/ftp/USER
AllowTcpForwarding no
ForceCommand internal-sftp
Password Authentication yes
SFTP is *NOT* using VSFTPD, so logging vsftp is different than logging sftp. Which one are you actually using?? You were given directives for configuring VSFTPD previously, which will exactly log what you're after.

If they're using SFTP, you need to look into using inotify on those home directories, which will do what you're after.
 
  


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
How to log internal-sftp chroot jailed users access log to /var/log/sftp.log file LittleMaster Linux - Server 0 09-04-2018 03:45 PM
convert screen.log and putty.log files into linux readable files aksharb Linux - Software 1 03-20-2011 07:16 AM
Can Samhain log my entries in /var/log/secure and /var/log/mesage to a central server abefroman Linux - Software 2 04-13-2008 04:13 PM
Opennms Logs - where are web.log, web_rtc.log and webauth.log referenced? not_much_of_a_guru Linux - Networking 0 07-12-2006 10:28 AM
Can log files be time stamped? (such as FTP login and transfer log files) bripage Linux - Networking 6 08-08-2002 10:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:13 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