What's new

ftp logging

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Everytime when I change something I reboot the router.

Please take a look:

When I create a /jffs/configs/vsftpd.conf exactly as follows:

anonymous_enable=NO
nopriv_user=root
write_enable=YES
local_enable=YES
chroot_local_user=YES
local_umask=000
dirmessage_enable=NO
xferlog_enable=YES
syslog_enable=NO
connect_from_port_20=YES
use_localtime=YES
listen=YES
pasv_enable=YES
pasv_min_port=57530
pasv_max_port=57560
tcp_wrappers=NO
max_clients=5
ftp_username=anonymous
ftpd_banner=Welcome to ASUS RT-AC86U FTP service.
ssl_enable=NO
vsftpd_log_file=/mnt/USB/vsftpd.log
log_ftp_protocol=YES
dual_log_enable=YES
xferlog_file=/mnt/USB/xfer.log
listen_port=874

I reboot the router and /etc/vsftpd.conf has been changed - the content of the /etc/vsftpd.conf is the same as given above.

But despite these entries, logs and even the listen_port=874 parameter does not work.

Although I used this listen_port=874 parameter via /jffs/configs/vsftpd.conf.add, it worked ok

Mmaybe something when executing a script or /jffs/configs/vsftpd.conf without the ".add" function is not working OK
 
And one more thing.

I did a simple test by just changing the ftp port as an example.

I create a /jffs/configs/vsftpd.conf.add exactly as follows:

listen_port=874

Reboot the router and /etc/vsftpd.conf has been changed and ftp works on port 874 ok.


Next I removed /jffs/configs/vsftpd.conf.add and create a /jffs/configs/vsftpd.conf exactly as follows:

anonymous_enable=NO
nopriv_user=root
write_enable=YES
local_enable=YES
chroot_local_user=YES
local_umask=000
dirmessage_enable=NO
xferlog_enable=NO
syslog_enable=NO
connect_from_port_20=YES
use_localtime=YES
listen=YES
pasv_enable=YES
pasv_min_port=57530
pasv_max_port=57560
tcp_wrappers=NO
max_clients=5
ftp_username=anonymous
ftpd_banner=Welcome to ASUS RT-AC86U FTP service.
ssl_enable=NO
listen_port=874

Reboot the router and /etc/vsftpd.conf has been changed but ftp dont work on port 874
 
Delete the two config files:
Code:
rm /jffs/configs/vsftpd.conf
rm /jffs/configs/vsftpd.conf.add

Create the /jffs/scripts/vsftpd.postconf exactly as follows:
Code:
#!/bin/sh

CONFIG=$1
source /usr/sbin/helper.sh

pc_replace "xferlog_enable=NO" "xferlog_enable=YES" $CONFIG
pc_replace "syslog_enable=NO" "syslog_enable=YES"  $CONFIG

pc_append  "listen_port=874" $CONFIG

Then run these commands:
Code:
dos2unix /jffs/scripts/vsftpd.postconf
chmod 755 /jffs/scripts/vsftpd.postconf
service restart_ftpd

Can you now login to the ftp service on port 874?
 
Delete the two config files:
Code:
rm /jffs/configs/vsftpd.conf
rm /jffs/configs/vsftpd.conf.add

Create the /jffs/scripts/vsftpd.postconf exactly as follows:
Code:
#!/bin/sh

CONFIG=$1
source /usr/sbin/helper.sh

pc_replace "xferlog_enable=NO" "xferlog_enable=YES" $CONFIG
pc_replace "syslog_enable=NO" "syslog_enable=YES"  $CONFIG

pc_append  "listen_port=874" $CONFIG

Then run these commands:
Code:
dos2unix /jffs/scripts/vsftpd.postconf
chmod 755 /jffs/scripts/vsftpd.postconf
service restart_ftpd

Can you now login to the ftp service on port 874?

I did exactly as you wrote and port 874 works ok, and now my /etc/vsftpd.conf looks like this:

anonymous_enable=NO
nopriv_user=root
write_enable=YES
local_enable=YES
chroot_local_user=YES
local_umask=000
dirmessage_enable=NO
xferlog_enable=YES
syslog_enable=YES
connect_from_port_20=YES
use_localtime=YES
listen=YES
pasv_enable=YES
pasv_min_port=57530
pasv_max_port=57560
tcp_wrappers=NO
max_clients=5
ftp_username=anonymous
ftpd_banner=Welcome to ASUS RT-AC86U FTP service.
ssl_enable=NO
listen_port=874
 
Good. So now if you look at the router's System Log you should see vsftpd entries when you log in and transfer files.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top