Unexpected directory listing line

Advertisement

jono
Guest

Unexpected directory listing line

I'm getting some odd error messages:
Error listing directory "/mnt/data".
Unexpected directory listing line "drwxr-xr-x 2 root 12288 Oct 25 16:06 NickPAYEbup".
Operation aborted
is typical.. Any ideas?

jono

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
38,408
Location:
Prague, Czechia

Re: Unexpected directory listing line

jono wrote:

Error listing directory "/mnt/data".
Unexpected directory listing line "drwxr-xr-x 2 root 12288 Oct 25 16:06 NickPAYEbup".
WinSCP expects group name in directory listing. Have you tried to check option "Alias LS to display group name" on "Shell" tab of Login dialog?
If it does not work, make proper settings on your server to force LS to display group name.

Reply with quote

Guest

Re: Unexpected directory listing line

Seems to expect a group whatever...
Solution is to always use a group name.

Thanks
jono

Reply with quote

hansfn
Guest

Re: Unexpected directory listing line

To me this behaviour seems like a very bad feature. On our system all users have group set to user name which WinSCP doesn't accept. Since our sysadmin hasn't defined any groups this make WinSCP unusable for me...

Regards, Hans - hansfn@gexcon.com

Edit: Forget all about this – I misunderstood. The solution for me was to force WinSCP to use bash in stead of my default tcsh shell.

Reply with quote

jarino
Guest

What shell?

Okay, I have looked at the hints here and I get the general thing to do. My question is then "what sort of shell does WinSCP activate?". I have put aliases in my .bashrc and .cshrc (which seems to be the default shell on my system), something like
alias ls='ls -g' (for bashrc).

So now when I ssh to my lab and do a ls -l, I get:
drwx------   9 arino    math         1024 Jan 14 18:35 .
But in the WinSCP log window, I see
drwx------   9 arino        1024 Jan 14 18:35 .
So why is my group is missing? I have specified to use bash, I've tried clearing up the aliases, setting them, forcing LS, not forcing it, etc.

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: What shell?

@jarino: Some general notes:
  • .bashrc might not be invoked for WinSCP session. And naturally if you set "Clear aliases" it cannot work.
  • Have you tried "Alias LS to display group name" option on Shell tab?

Reply with quote

Guest

Re: Unexpected directory listing line

@hansfn: This worked for me, I deselected Clear aliases, selected Alias ls to display group name, and forced bash shell, and now it works great :)

Reply with quote

knerzelman
Guest

It is caused by group name and byte length as one string

I'd say WinSCP expects a BLANK between the group and byte entry.

Bad example:
-rw-rw-rw-    1 admin    administ5572351239 Jan  2 20:39 Movie.mkv
An alias of ls to ls -lh should solve the issue as bytes are then converted to human readable.

Good example:
-rw-rw-rw-    1 admin    administ     5.2G Jan  2 20:39 Movie.mkv

Reply with quote

Advertisement

will.waterston@...
Guest

Are any of the directory listing solutions available in .NET/C# assembly?

The Linux device I'm trying to synchronise files to (using session.SynchronizeDirectories()) does not include either owner or group in the default directory listing (ls -al). I cannot make environment changes to this device, nor can I use SFTP/FTP. There are suggestions here to modify the directory listing command using sed or something similar, but I can't see how to do this using the .NET assembly. The SessionOptions class does not seem to include these options.

Any suggestions on how to get around this?

Thanks

Reply with quote

Advertisement

You can post new topics in this forum