I have multiple users for my vsftpd instance that users can connect to.
User1 home directory: /ftp/user1 - works fine
User2 home directory: /ftp/user2 - works fine
User3 home directory: /ftp - works fine, this user is in charge of managing files for other users
user4(me) home directory /var/www/html - "failed to retrieve directory listing" with UFW enabled.
user4 is owner of /var/ww/html and all contents.
Filezilla log:
Status: Connecting to [ipaddress]:21...
Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: Verifying certificate...
Status: TLS connection established.
Status: Server does not support non-ASCII characters.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is the current directory
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PASV
Response: 227 Entering Passive Mode (ip,ip,ip,ip,159,151).
Command: LIST
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing
With UFW disabled, the connection works as expected.
I had much more rules, but I broke something. I reset iptables, then cleared the ufw rules, and set up this.
I have 2 adaptors in this machine, one connecting to my private network, one is public facing if that matters.
default deny incoming
default allow outgoing
ufw status:
Status: active
To Action From
-- ------ ----
Apache ALLOW Anywhere
21/tcp ALLOW Anywhere
22 ALLOW [lanip]/24
5222 ALLOW [lanip]/24
Samba ALLOW Anywhere
5269 ALLOW [lanip]/24
Apache Full ALLOW Anywhere
Apache Secure ALLOW Anywhere
Am I missing rules for passive ports?