Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLST issues #36

Closed
unxed opened this issue Aug 29, 2021 · 12 comments
Closed

MLST issues #36

unxed opened this issue Aug 29, 2021 · 12 comments
Milestone

Comments

@unxed
Copy link

unxed commented Aug 29, 2021

Looks like uftpd's MLST support is buggy. Details: elfmz/far2l#1067 (comment)

@troglobit
Copy link
Owner

Thanks for letting me know, and sorry for the late reply! I'm entering a new release cycle with uftpd and I'll have a look at it.

@troglobit troglobit modified the milestones: v2.10, v2.14 Nov 30, 2021
@troglobit
Copy link
Owner

Reproduced with tnftp in Linux Mint. Seems to be localized to MLST, MLSD works ... at least with ncftp. Will continue testing and see if I can get this fix into the v2.14 release, which I've planned for this coming weekend.

@troglobit
Copy link
Owner

Fixed in https://github.com/troglobit/uftpd/releases/tag/v2.14

@unxed
Copy link
Author

unxed commented Dec 11, 2021

Can't test on Ubuntu 18.04:

curl -sS https://deb.troglobit.com/pubkey.gpg | sudo apt-key add -
echo "deb [arch=amd64] https://deb.troglobit.com/debian stable main" | sudo tee /etc/apt/sources.list.d/troglobit.list
sudo apt-get update && sudo apt-get install uftpd                                                                      ↑
...
The following packages have unmet dependencies:
 uftpd : Depends: libc6 (>= 2.28) but 2.27-3ubuntu1.4 is to be installed
E: Unable to correct problems, you have held broken packages.

@troglobit
Copy link
Owner

Source is available. I have no means to support all possible deb targets.

@elfmz
Copy link

elfmz commented Dec 12, 2021

i tried recent master and seems it fixed now, however another (new) issue appeared: each file is listed twice in LIST command. Server ran by ./uftpd -n -o ftp=2222 /home/user on machine 192.168.1.X, connecting with netcat from another machine to it:

$nc 192.168.1.X 2222
220 uftpd (2.14) ready.
user anonymous
230 Guest login OK, access restrictions apply.
PASV 192,168,1,X
227 Entering Passive Mode (192,168,1,X,215,169)
LIST
125 Data connection already open; transfer starting.
226 Transfer complete.

.. and another netcat connected just after PASV command responce:

$ nc 192.168.1.X 55209
-rw------- 1     0     0         6211 Sep 28 01:03 .bash_history
-rw-r--r-- 1     0     0          220 May  8 00:44 .bash_logout
-rw-r--r-- 1     0     0         3771 May  8 00:44 .bashrc
drwx------ 1     0     0         4096 Aug 18 18:18 .cache
drwxr-xr-x 1     0     0         4096 Sep 29 10:39 .config
-rw-rw-r-- 1     0     0          230 Jun 14 15:38 .gitconfig
drwx------ 1     0     0         4096 Jun 27 12:56 .gnupg
drwxr-xr-x 1     0     0         4096 Jun 17 20:36 .local
drwx------ 1     0     0         4096 Nov  2 13:27 .mozilla
-rw-r--r-- 1     0     0          354 Oct  6 21:42 .pam_environment
-rw-r--r-- 1     0     0          807 May  8 00:44 .profile
-rw------- 1     0     0           30 Jul 22 00:57 .python_history
-rw-rw-r-- 1     0     0           72 Oct 25 23:09 .selected_editor
drwx------ 1     0     0         4096 Jun 28 01:47 .ssh
-rw-r--r-- 1     0     0            0 May  8 01:18 .sudo_as_admin_successful
drwx------ 1     0     0         4096 Jun  1 00:06 .thunderbird
-rw-rw-r-- 1     0     0          993 Sep 26 02:10 .wget-hsts
drwxr-xr-x 1     0     0         4096 May  8 01:17 Desktop
drwxr-xr-x 1     0     0         4096 May  8 01:17 Documents
drwxr-xr-x 1     0     0         4096 May  8 01:17 Downloads
drwxr-xr-x 1     0     0         4096 May  8 01:17 Music
drwxr-xr-x 1     0     0         4096 Oct  9 12:01 Pictures
drwxr-xr-x 1     0     0         4096 May  8 01:17 Public
drwxr-xr-x 1     0     0         4096 May  8 01:17 Templates
drwxr-xr-x 1     0     0         4096 May  8 01:17 Videos
drwxrwxr-x 1     0     0         4096 Mar 16 17:27 mnt
drwx------ 1     0     0         4096 Jun 17 20:33 snap
drwxrwxr-x 1     0     0         4096 Dec 11 23:01 test
-rw------- 1     0     0         6211 Sep 28 01:03 .bash_history
-rw-r--r-- 1     0     0          220 May  8 00:44 .bash_logout
-rw-r--r-- 1     0     0         3771 May  8 00:44 .bashrc
drwx------ 1     0     0         4096 Aug 18 18:18 .cache
drwxr-xr-x 1     0     0         4096 Sep 29 10:39 .config
-rw-rw-r-- 1     0     0          230 Jun 14 15:38 .gitconfig
drwx------ 1     0     0         4096 Jun 27 12:56 .gnupg
drwxr-xr-x 1     0     0         4096 Jun 17 20:36 .local
drwx------ 1     0     0         4096 Nov  2 13:27 .mozilla
-rw-r--r-- 1     0     0          354 Oct  6 21:42 .pam_environment
-rw-r--r-- 1     0     0          807 May  8 00:44 .profile
-rw------- 1     0     0           30 Jul 22 00:57 .python_history
-rw-rw-r-- 1     0     0           72 Oct 25 23:09 .selected_editor
drwx------ 1     0     0         4096 Jun 28 01:47 .ssh
-rw-r--r-- 1     0     0            0 May  8 01:18 .sudo_as_admin_successful
drwx------ 1     0     0         4096 Jun  1 00:06 .thunderbird
-rw-rw-r-- 1     0     0          993 Sep 26 02:10 .wget-hsts
drwxr-xr-x 1     0     0         4096 May  8 01:17 Desktop
drwxr-xr-x 1     0     0         4096 May  8 01:17 Documents
drwxr-xr-x 1     0     0         4096 May  8 01:17 Downloads
drwxr-xr-x 1     0     0         4096 May  8 01:17 Music
drwxr-xr-x 1     0     0         4096 Oct  9 12:01 Pictures
drwxr-xr-x 1     0     0         4096 May  8 01:17 Public
drwxr-xr-x 1     0     0         4096 May  8 01:17 Templates
drwxr-xr-x 1     0     0         4096 May  8 01:17 Videos
drwxrwxr-x 1     0     0         4096 Mar 16 17:27 mnt
drwx------ 1     0     0         4096 Jun 17 20:33 snap
drwxrwxr-x 1     0     0         4096 Dec 11 23:01 test

Although command line ftp client shows only single file, likely it 'deduplicates' them internally. FileZilla for Windows however also shows duplicated entries in list.

@elfmz
Copy link

elfmz commented Dec 12, 2021

Too early assumed that MLST works, it works only for directories, but always fails for files. Here is log from netcat to uftpd:

$ nc 192.168.1.X 2222
220 uftpd (2.14) ready.
user anonymous
230 Guest login OK, access restrictions apply.
CWD test
250 OK
MLST zz
250- Listing zz
modify=20210810115151;perm=lepc;type=dir; zz
250 End.
mlst linux.iso
550 No such file or directory.

Here is netcat session to pure-ftpd running on same machine:

$ nc 192.168.1.X 21
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 00:10. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
user XXX
331 User user OK. Password required
pass XXX
230 OK. Current directory is /home/user
CWD test
250 OK. Current directory is /home/user/test
MLST zz
250-Begin
 type=dir;sizd=4096;modify=20210810085151;UNIX.mode=0775;UNIX.uid=1000;UNIX.gid=1000;unique=805g4207af; zz
250 End.
MLST linux.iso
250-Begin
 type=file;size=69797888;modify=20200623060543;UNIX.mode=0664;UNIX.uid=1000;UNIX.gid=1000;unique=805g4011d3; linux.iso
250 End.

@troglobit
Copy link
Owner

troglobit commented Dec 13, 2021

Dammit, OK reopening 😞

Reproduced both issues, files listed twice, and mlst not working on files. Naturally the new one needs to go in its own bug report as a regression introduced in the latest release. I'll see what I can do over the next couple of days.

Thank you all for testing and reporting back!

@troglobit troglobit reopened this Dec 13, 2021
troglobit added a commit that referenced this issue Dec 19, 2021
Check that MLST works properly, issue #36

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit
Copy link
Owner

OK @elfmz, I've just pushed a bunch of changes to master which seem to fix the issues you reported. I'll probably do the v2.15 release later tonight, but I can postpone it if you'd like to help verify it first. Which I'd be very grateful for, of course! 😃

@elfmz
Copy link

elfmz commented Dec 19, 2021

Didnt tested really throughfully, but current master looks now OK - both last issues not reproduced.

@troglobit
Copy link
Owner

Awesome, thank you for testing it out! <3

@troglobit
Copy link
Owner

Release v2.15 is out now.

Huge thanks to everyone for reporting, testing, and hanging in there! Merry Christmas 🎅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants