Symbolic links by FTP connection are opened as absolute path

Bug #508785 reported by Bruce
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mc (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: mc

I am using Pure-FTPd on server, which allows symbolic links in virtual chroot to go outside of the chroot. I tryied 4 different FTP clients on Windows, everyone opens the symbolic link correctly (CWD linkname), but when I try it with Midnight Commander, he tryies open the link with absolute path:

Server directory structure:

/var/www/login/
|-logs
|-ftp
| |- logs -> /var/www/login/logs
| |- somefiles

Chroot is on ftp directory. When I try some FTP clients, everyone opens the logs symlink with 'CWD logs' but Midnight Commander executes 'CWD //var/www/login' (this I get from packet sniffer, perhaps he tryies to open the absolute path, then the requested directory).

I just tryied the Nautilus, the behaviour is the same as Midnight Commander, FileZilla works ok.

Ubuntu 9.10
mc 2:4.6.2-2ubuntu1

ProblemType: Bug
Architecture: amd64
Date: Sun Jan 17 16:05:00 2010
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: fglrx
Package: mc 2:4.6.2-2ubuntu1
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
SourcePackage: mc
Uname: Linux 2.6.31-17-generic x86_64

Revision history for this message
Bruce (bruce-blackpage) wrote :
Revision history for this message
Yury V. Zaytsev (zyv) wrote :

From the description it's not quite clear to me why this is a bug. Windows doesn't have the concept of relative symlinks, so it's quite clear, that Windows clients just treat it as another directory. Apparently mc tries (tried) to be smart and dereferenced the symlinks. I am not sure why such a design choice would be made, but there might be a reason for it...

Just in case, is this still an issue with the latest package? I don't have ftp to reproduce.

https://launchpad.net/~zyv/+archive/ppa

Revision history for this message
Bruce (bruce-blackpage) wrote :

This is a bug, because you can not open some paths and get to such directory content on the FTP server. Midnight Commander nor Nautilus can be used for accessing paths outside of the FTP root directory which are created as symbolic links. FileZilla on Linux has no problem, I can open symbolic links, because FileZilla opens it as link name, not as absolute/relative path. Midnight Commander or Nautilus should open the link with CWD logs and not CWD /var/www/login/logs

Today I have:
mc 3:4.7.0-1ubuntu2

what is possibly not the newest package. I will try to upgrade to 10.10 in 2-3 weeks and can test it again.

Revision history for this message
Yury V. Zaytsev (zyv) wrote :

I am not sure whether "opening link as a name" is a valid behavior that is expected from the FTP clients. I guess I have to do some digging in the RFCs for that matter if miraculously I get some spare time...

Hmmm...

Revision history for this message
Maarten Bezemer (veger) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. We are sorry that we do not always have the capacity to look at all reported bugs in a timely manner. There have been many changes in Ubuntu since that time you reported the bug and your problem and told that you would try a newer version, so the problem may have been fixed with some of the updates. It would help us a lot if you could test it on a currently supported Ubuntu version. When you test it and it is still an issue, kindly upload the updated logs by running apport-collect 508785 and any other logs that are relevant for this particular issue.

Also in my PPA (https://launchpad.net/~veger/+archive/ppa) is a very new version, that hopefully will be accepted into the Ubuntu repositories soon (bug #905610), if you 'dare' you could try that one as well.

Changed in mc (Ubuntu):
status: New → Incomplete
Revision history for this message
Yury V. Zaytsev (zyv) wrote :

It is my impression that if this can still be reproduced with latest mc, this could be a design choice and this has to be brought up with upstream developers.

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

[Expired for mc (Ubuntu) because there has been no activity for 60 days.]

Changed in mc (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Yury V. Zaytsev (zyv) wrote :

I wonder who turned out auto-expiry and how to turn it off??? It's already a second bug closed because of expiry limits, but it's perfectly valid and should eventually be taken care of.

Changed in mc (Ubuntu):
status: Expired → New
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.