You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VSFTPD上传大于14KB文件超时问题求助

Fixing VSFTPD 3.0.3 Upload Failures for Files >14KB on Ubuntu 16.04.3 LTS

Hey Jack, let's dig into this frustrating upload issue you're having. Both NetBeans and FileZilla failing with files over 14KB points to a systemic problem with your VSFTPD setup, not just a client quirk. Here are the most likely culprits and step-by-step fixes to get you back up and running:

1. Passive Mode Port Configuration (Most Common Cause)

VSFTPD relies on passive mode for large file transfers by default, but if the required port range isn't properly configured or firewalled, transfers will hang once they exceed the initial small packet size.

Fix Steps:

  • Open your vsftpd.conf file with a text editor:
    sudo nano /etc/vsftpd.conf
    
  • Ensure these lines are present and uncommented (adjust ports if needed, but 40000-50000 is a safe range):
    pasv_enable=YES
    pasv_min_port=40000
    pasv_max_port=50000
    
  • Save the file and restart VSFTPD:
    sudo systemctl restart vsftpd
    
  • Allow the port range through UFW (Ubuntu's default firewall):
    sudo ufw allow 40000:50000/tcp
    

Test uploading a large file now—this resolves 90% of similar issues.

2. AppArmor Restrictions

Ubuntu's AppArmor security module might be blocking VSFTPD from using the passive mode ports you just configured.

Fix Steps:

  • Check if AppArmor is enforcing rules for VSFTPD:
    sudo aa-status
    
  • If you see usr.sbin.vsftpd listed under "enforce", temporarily switch to complain mode to test:
    sudo aa-complain /etc/apparmor.d/usr.sbin.vsftpd
    
  • Try uploading again. If it works, permanently update the AppArmor profile:
    Open /etc/apparmor.d/usr.sbin.vsftpd and add this line inside the braces:
    network tcp port 40000-50000,
    
  • Reload AppArmor to apply changes:
    sudo systemctl reload apparmor
    

3. Disk Space or Inode Exhaustion

Even if you think you have space, a full disk or exhausted inodes (file system metadata) can block large uploads.

Check Commands:

  • Verify free disk space for your upload directory's partition:
    df -h /path/to/upload/directory
    
  • Check inode usage:
    df -i /path/to/upload/directory
    

If either is at 100%, free up space or delete unused files to free inodes.

4. Incorrect Directory Permissions

Your upload directory might not have the right write permissions for the FTP user.

Fix Steps:

  • Set the correct owner (replace ftpuser with your actual FTP username):
    sudo chown -R ftpuser:ftpuser /path/to/upload/directory
    
  • Set appropriate permissions (read/write for owner, read for others):
    sudo chmod -R 755 /path/to/upload/directory
    

5. VSFTPD Upload Limits

Double-check that your config isn't explicitly restricting upload sizes.

Fix Steps:

  • Open vsftpd.conf and look for max_upload_size. If present, set it to a value larger than your target files (e.g., max_upload_size=100M for 100MB files).
  • Ensure write_enable=YES is uncommented—this is required for any uploads to work.

If none of these steps resolve the issue, share the exact error lines from your NetBeans FTP log (e.g., timeout messages, connection reset errors) and your full vsftpd.conf content. That will help narrow down more obscure issues like network routing problems or corrupted VSFTPD binaries.

内容的提问来源于stack exchange,提问作者Jack Skeletron

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 09:40:50