Unexpected directory listing line

Advertisement

jono
Guest

Unexpected directory listing line

Im 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:
27,226
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.
_________________
Martin Prikryl

Reply with quote

Guest

Re: Unexpected directory listing line

martin wrote:

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.

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

Thanks

jono

Reply with quote

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

Reply with quote

Guest

Re: Unexpected directory listing line

Hans wrote:

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.

Forget all about this - I misundetstood. The solution for me was to force WinSCP to use bash in stead of my default tcsh shell.

Hans

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

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: What shell?

jarino wrote:

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.
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?

_________________
Martin Prikryl

Reply with quote

Guest

Re: Unexpected directory listing line

Anonymous wrote:

Hans wrote:

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.

Forget all about this - I misundetstood. The solution for me was to force WinSCP to use bash in stead of my default tcsh shell.

Hans

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

Guest

Re: What shell?

martin wrote:

jarino wrote:

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.
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?

I have. Now I seem to be having a peculiar problem: I set the options as suggested, and saved them as default. When I look at them, I have for example no check mark in "Clear aliases". However, when I look at the connexion log, I have:
Clear aliases: Yes, Unset nat.vars: Yes
Alias LS: No, Ign LS warn: Yes, Scp1 Comp: No

And the program indeed goes on to clear the aliases and in particular
Clearing all aliases.
unalias "ls" ; echo "WinSCP: this is end-of-file:$status"
WinSCP: this is end-of-file:0

So of course, my alias ls='ls -g' doesn't work. Why is it ignoring its configuration?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Solution

For list of reasons WinSCP cannot parse directory listing and possible resolutions, see documentation.
_________________
Martin Prikryl

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

You can post new topics in this forum