Can't use sftp commands from within directories with brackets in the name

Bug #530714 reported by Adam Buchbinder
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
portable OpenSSH
Unknown
Unknown
openssh (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Over sftp, I can navigate into directories with brackets in the name, but I can't do anything once I'm there. The suggestions in bug 267980 don't fix this, because I can't escape the directory name when I'm not even writing it in the 'ls' command.

To replicate:

/tmp$ mkdir \[test\]
/tmp$ sftp localhost
Connecting to localhost...
sftp> cd /tmp
sftp> cd \[test\]
sftp> ls
Can't ls: "/tmp/[test]" not found
sftp> pwd
Remote working directory: /tmp/[test]

ProblemType: Bug
Architecture: i386
Date: Tue Mar 2 09:29:46 2010
DistroRelease: Ubuntu 9.10
Package: openssh-client 1:5.1p1-6ubuntu2
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-19.56-generic
SourcePackage: openssh
Uname: Linux 2.6.31-19-generic i686

Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :
Revision history for this message
Thierry Carrez (ttx) wrote :

I can confirm this behavior.
Works with get (get /tmp/\[test\]/moo) and even with ls from outside the directory (ls /tmp/\[test\]). Just not when you cd to it.

Changed in openssh (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
summary: - Can't sftp to directories with brackets in the name.
+ Can't use sftp commands from within directories with brackets in the
+ name
Revision history for this message
Colin Watson (cjwatson) wrote :

Fixed upstream in OpenSSH 5.6. Probably not for Maverick now, but it'll be in Natty.

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

This bug was fixed in the package openssh - 1:5.6p1-1ubuntu1

---------------
openssh (1:5.6p1-1ubuntu1) natty; urgency=low

  * Resynchronise with Debian experimental. Remaining changes:
    - Add support for registering ConsoleKit sessions on login.
    - Drop openssh-blacklist and openssh-blacklist-extra to Suggests; they
      take up a lot of CD space, and I suspect that rolling them out in
      security updates has covered most affected systems now.
    - Convert to Upstart. The init script is still here for the benefit of
      people running sshd in chroots.
    - Install apport hook.
    - Add ssh-import-id utility.

openssh (1:5.6p1-1) experimental; urgency=low

  * New upstream release (http://www.openssh.com/txt/release-5.6):
    - Added a ControlPersist option to ssh_config(5) that automatically
      starts a background ssh(1) multiplex master when connecting. This
      connection can stay alive indefinitely, or can be set to automatically
      close after a user-specified duration of inactivity (closes: #335697,
      #350898, #454787, #500573, #550262).
    - Support AuthorizedKeysFile, AuthorizedPrincipalsFile,
      HostbasedUsesNameFromPacketOnly, and PermitTunnel in sshd_config(5)
      Match blocks (closes: #549858).
    - sftp(1): fix ls in working directories that contain globbing
      characters in their pathnames (LP: #530714).

openssh (1:5.5p1-5) unstable; urgency=low

  * Use an architecture wildcard for libselinux1-dev (closes: #591740).
  * debconf template translations:
    - Update Danish (thanks, Joe Hansen; closes: #592800).
 -- Colin Watson <email address hidden> Wed, 13 Oct 2010 11:25:40 +0100

Changed in openssh (Ubuntu):
status: Confirmed → Fix Released
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.