glftpd unable to handle certain directory names

Bug #1088679 reported by Reik Schatz
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux-ftpd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I have been using glftpd on Ubuntu 8.04 LTS and 10.04 LTS without a problem. After the latest update to Ubuntu 12.04 LTS some serious issues are surfacing with particular directories. I think this is happening with either very long names or if a specific pattern is contained.

To reproduce the problem:

- install vanilla 12.04 in a virtualbox
- sudo apt-get install xinetd zip unzip openssl
- wget http://www.glftpd.dk/files/glftpd-LNX_2.01.tgz
- tar -zxvf glftpd-LNX_2.01.tgz
- cd glftpd-LNX_2.01
- sudo ./installgl.sh

Give the following answers to the installer:
Use tcpd: [Y]es
Use a jailed environment?: [Y]es
Please enter the private directory to install glftpd inside [/jail]: enter
Use a private group?: [Y]es
What would you like your private group to be called? [glftpd]: enter
Please enter the directory inside /jail to install glftpd to [/glftpd]: enter
Press <enter> for the default (glftpd)> enter
Enter the port you would like glftpd to listen on [1337]: 10087
Do you want to use [I]netd or [X]inetd? X
This is for glftpd's 'reset' binary (see docs for more info) [Y/N]: Y
Please specify location, inside /jail/glftpd, to install the cert (ftpd-dsa.pem) [/etc]: enter
Please specify a generic name for this certificate. ... (press enter for glftpd): enter

- sudo service xinetd stop
- add ipmask to glftpd user, i.e. sudo echo 'IP *@*' >> /jail/glftpd/ftp-data/users/glftpd
- start ftp client, use FTP over TLS and login to localhost:10087 with user:glftpd & pass:glftpd

Now try and create the directory Our.Trip.To.Berlin.In.August.The.Portfolio.Audio.And.Graphics.2012.720p.x264.SAMPLE-gERMANY using the MKD command:

21:43 >>> MKD Our.Trip.To.Berlin.In.August.The.Portfolio.Audio.And.Graphics.2012.720p.x264.SAMPLE-gERMANY
21:43 257 "/incoming/Our.Trip.To.Berlin.In.August.The.Portfoudio.And.2012.720p.720p.x264.SAM.x264.SAMPLE-gERMANY" created.
21:43 >>> CWD Our.Trip.To.Berlin.In.August.The.Portfolio.Audio.And.Graphics.2012.720p.x264.SAMPLE-gERMANY
21:43 550 Our.Trip.To.Berlin.In.August.The.Portfolio.Audio.And.Graphics.2012.720p.x264.SAMPLE-gERMANY: No such file or directory.

Notice how it mixes up the characters in the directory it creates (output after the MKD command). Then it tries to CWD into this directory which of course does not exist because it was created with a different name. I wonder if this is cause by some overflow problem.

On a side note, testing this on different machines, sometime while logged in the process glftpd:glftpd is sometimes run as root sometimes as libuuid depending on the machine I try this on.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: ftpd (not installed)
ProcVersionSignature: Ubuntu 3.2.0-34.53-generic-pae 3.2.33
Uname: Linux 3.2.0-34-generic-pae i686
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu15
Architecture: i386
Date: Mon Dec 10 22:56:50 2012
MarkForUpload: True
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: linux-ftpd
UpgradeStatus: Upgraded to precise on 2012-12-05 (5 days ago)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-ftpd (Ubuntu):
status: New → Confirmed
Revision history for this message
Jon P (mlsjunkmail) wrote :

Same issue, has any workaround been discovered? This is a huge problem for me. Willing to help debug, whatever it takes.

Revision history for this message
Jon P (mlsjunkmail) wrote :

Update: This is fixed in glFTPD 2.02rc1 for anyone else who has this problem.

Revision history for this message
Reik Schatz (reik-schatz) wrote :

I wasn't able to find glFTPD 2.02rc1. Do you have a link so I can verify it?

Revision history for this message
Reik Schatz (reik-schatz) wrote :

Found it here: http://glftpd.eu/ and confirmed to be working!

Revision history for this message
Ken Sharp (kennybobs) wrote :

Nothing to do with this package.

Changed in linux-ftpd (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.