FTP Timeout not honored

Forza

Explorer
Joined
Apr 28, 2021
Messages
81
Hi!

I need to setup a longer timeout for no transfers than 300 seconds. I changed the value in the web interface but it is not honored.
1635167511778.png



/usr/local/etc/proftpd.conf still contains
```
TimeoutLogin 300
TimeoutNoTransfer 300
TimeoutStalled 3600
```

I am running a backup application that stores files over FTP and it goes through every directory, looking for changes. This is taking approximately 30-60 minutes with no files transferred. So even though the application is doing several CWD's a seconds, TimeoutNoTransfer still striggers after 5 minutes.

The problem seems the same as https://www.truenas.com/community/threads/ftp-timeout.19277/

Is it ok to manually edit this config file? How can I persist it during TrueNAS Core upgrades?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Have you tried restarting the FTP service after editing this value?
 

Forza

Explorer
Joined
Apr 28, 2021
Messages
81
Have you tried restarting the FTP service after editing this value?
I restarted after editing the Timeout in the WebUI. I am testing now again after editing the config file directly. Let's see how that goes.

Update: "No transfer timeout (300 seconds): closing control connection"

It doesn't work.. It seems the /usr/local/etc/proftpd.conf get's reset every time I restart the ftp service, so the parameter doesn't stick.

OK, tried adding "TimeoutNoTransfer 7200" as auxiliary parameter. That seems to have been added to the config file at the bottom.

Code:
ServerName "truenas FTP Server"
ServerType standalone
DefaultServer on
DefaultAddress localhost
UseIPv6 on
Port 2222
User nobody
Group nogroup
Umask 006 000
SyslogFacility ftp
MultilineRFC2228 off
DisplayLogin /var/run/proftpd/proftpd.motd
DeferWelcome off
TimeoutIdle 7200
TimeoutLogin 300
TimeoutNoTransfer 300
TimeoutStalled 3600
MaxInstances none
    MaxClients 10
    MaxLoginAttempts 3
DefaultTransferMode ascii
AllowForeignAddress off
IdentLookups off
UseReverseDNS off
    PassivePorts  2223 2229

    <Limit LOGIN>
        AllowAll
    </Limit>

<Global>
    RequireValidShell off
        DefaultRoot ~ !wheel
    AllowOverwrite on
        AllowRetrieveRestart on
        AllowStoreRestart on
    DeleteAbortedStores off
    TimesGMT off
</Global>


<IfModule mod_ban.c>
    BanEngine off
    BanControlsACLs all allow group wheel
    BanLog /var/log/proftpd/ban.log
    BanMessage Host %a has been banned
    # -m "mod_ban/rule"
    # -v "concat('  BanOnEvent ',event,' ',occurrence,'/',timeinterval,' ',expire)" -n
    # -b
    BanTable /var/run/proftpd/ban.tab
</IfModule>

TimeoutNoTransfer 7200

<IfModule mod_delay.c>
    DelayEngine on
    DelayTable /var/run/proftpd/proftpd.delay
</IfModule>

<IfModule mod_wrap.c>
    TCPAccessFiles "/etc/hosts.allow" "/etc/hosts.deny"
    TCPAccessSyslogLevels info warn
    TCPServiceName ftpd
</ifModule>


Update 2: This did not help. The first TimeoutNoTransfer takes precedence.
 
Last edited:

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
It isn't okay to manually edit files, no. As you discovered, they will be overwritten. That's the GUI's purpose, is to manage settings.

If it isn't getting set correctly in the file, then please "Report a Bug" at the top of the page.
 

Forza

Explorer
Joined
Apr 28, 2021
Messages
81
Got an update on the JIRA that the fix will be in TrueNAS 13.
 
Top