在Ubuntu系統中,FTP服務器的日志文件通常位于/var/log
目錄下。具體日志文件的位置和名稱取決于您使用的FTP服務器軟件。以下是一些常見的FTP服務器及其日志文件位置:
vsftpd(Very Secure FTP Daemon):
/var/log/vsftpd.log
。sudo tail -f /var/log/vsftpd.log
ProFTPD:
/var/log/proftpd/
目錄下,具體文件名可能是proftpd.log
或其他自定義名稱。sudo tail -f /var/log/proftpd/proftpd.log
Pure-FTPd:
/var/log/pure-ftpd/
目錄下,具體文件名可能是pure-ftpd.log
或其他自定義名稱。sudo tail -f /var/log/pure-ftpd/pure-ftpd.log
FileZilla Server(如果您使用的是Windows版本的FileZilla Server):
log
文件夾中。sudo tail -f /path/to/filezilla/log/filename.log
請注意,日志文件的名稱和位置可能會因配置而異。您可以檢查FTP服務器的配置文件以獲取確切的日志文件路徑。例如,對于vsftpd,您可以查看/etc/vsftpd.conf
文件中的xferlog_enable
和xferlog_file
選項。
此外,您還可以使用journalctl
命令查看系統日志,其中可能包含FTP服務器的相關信息:
sudo journalctl -u vsftpd.service -f
請將vsftpd.service
替換為您實際使用的FTP服務器服務名稱。