Author Topic: ssh garbles directory structure  (Read 6567 times)

brenthills

  • Community Member
  • Posts: 5
  • Hero Points: 0
ssh garbles directory structure
« on: August 05, 2010, 09:44:44 pm »
Hello when I try and use an ssh/sftp session.  The session connects but the file list is garbled and looks like some files include date time information.  In the current listing the last file is named 'ok' and I can open but prior (garbled) ones won't.

I tried using my licensed version 12.0.3 and the current "demo" both had the same result from an Ubuntu system connecting to a Debian system.

Any suggestions?
« Last Edit: August 05, 2010, 10:04:41 pm by brenthills »

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 771
  • Hero Points: 52
Re: ssh garbles directory structure
« Reply #1 on: August 05, 2010, 10:22:28 pm »
It looks like we are having a problem parsing the listing we get back from the sftp-server. This is not a common problem, so we will need some more information.

Turn on "Save raw directory listing to $list" (File>FTP>Default Options, Debug tab)
Connect to offending site
Attach generated '/tmp/$list' file (pick a directory you are not sensitive about sharing a listing from)

What can you tell me about this sftp-server besides it being on a Debian box? Which distribution of Debian? Is it a vanilla install of ssh and sftp subsystem, or some custom package that is not openssh? Anything else you think is relevant?

--rodney

brenthills

  • Community Member
  • Posts: 5
  • Hero Points: 0
Re: ssh garbles directory structure
« Reply #2 on: August 05, 2010, 10:53:41 pm »
The server uses ldap for groups and has group names that include white spaces is that unusual enough to trigger a parsing issue?

Other then that it is vanilla Debian as far as I know sshd on the system reports the following version info:
OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007


brenthills

  • Community Member
  • Posts: 5
  • Hero Points: 0
Re: ssh garbles directory structure
« Reply #3 on: August 05, 2010, 11:14:49 pm »
Confirmed the source of the problem parsing filenames over ssh is with group names that include whitespace.  (I changed the groups on a test directory and voila the files are manageable again.

Any chance they can accommodate this possibility in the parse?  I definitely won't be able to alter their group management server side.  I'm manually rsyncing directories over ssh to work around this issue but it would be nice if it just worked.

If you fixed this in a recent release I would pay to upgrade for it (if that provides any incentive).

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 771
  • Hero Points: 52
Re: ssh garbles directory structure
« Reply #4 on: August 06, 2010, 01:40:13 am »
I'll have a look. Shouldn't be difficult. There are other special cases we handle when parsing (e.g. no group on QNX hosts), so we just have to be careful about ambiguity.

--rodney

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 771
  • Hero Points: 52
Re: ssh garbles directory structure
« Reply #5 on: August 06, 2010, 04:08:07 pm »
EDIT: This macro patch is for version 12.0.3 ONLY.

Try the attached macro module sftpparse.e. Instructions:

1. Backup slickedit/macros/sftpparse.e
2. Copy in attached sftpparse.e to slickedit/macros/
3. Load slickedit/macros/sftpparse.e (Macro>Load Module)

Let me know that this works for you, so I can include the fix in the latest hotfix for v15. Then you can upgrade. ;-)

--rodney
« Last Edit: August 07, 2010, 06:15:04 pm by Rodney »

brenthills

  • Community Member
  • Posts: 5
  • Hero Points: 0
Re: ssh garbles directory structure
« Reply #6 on: August 07, 2010, 04:17:57 pm »
When I load try to load the module the following is displayed:

 /opt/slickdemo/macros/sftpparse.e 9 48:Expecting ')'

(I was using the current demo but I could try my licensed earlier version if it is more appropriate).  Doesn't seem to effect a change.

Graeme

  • Senior Community Member
  • Posts: 2561
  • Hero Points: 330
Re: ssh garbles directory structure
« Reply #7 on: August 07, 2010, 04:53:47 pm »
I'm guessing you could try changing  ftpConnProfile_t to FtpConnProfile and sftpDirectory_t to SftpDirectory throughout the file.

Graeme

Edit : I'm not guessing - that's what you should do!

« Last Edit: August 07, 2010, 04:57:14 pm by Graeme »

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 771
  • Hero Points: 52
Re: ssh garbles directory structure
« Reply #8 on: August 07, 2010, 06:14:29 pm »
Sorry. You said you had 12.0.3 (and only tried the current demo to see if the problem had been corrected), so I put a patch for 12.0.3 up here. I was waiting to here back that all was okay for you in 12.0.3, then pushing out a hotfix for v15. Graeme is correct about the changes being minor renames in case you want to hack on your sftpparse.e from the v15 trial.

--rodney

brenthills

  • Community Member
  • Posts: 5
  • Hero Points: 0
Re: ssh garbles directory structure
« Reply #9 on: August 13, 2010, 02:34:37 am »
Both work fine, thanks for attending to my isolated issue.  Sorry, I was unsure which you would apply it too and only attempted it with the demo.

As indicate, I will purchase the new version when I get back from vacation.  Its a good product, one I update every few years anyway.  Thanks for the assistance.

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 771
  • Hero Points: 52
Re: ssh garbles directory structure
« Reply #10 on: August 13, 2010, 12:16:23 pm »
Glad to hear it worked. The next 15.0.1 hotfix will include this fix, so it will be ready for you when you get back. Have a great vacation!

--rodney