Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Incorrect display of user and group permissions when file owner's name contains one or more spaces

I'm afraid that there's no reliable way.
Medalha

Re: Incorrect display of user and group permissions when file owner's name contains one or more spaces

martin wrote:

PuTTY does not know anything. PuTTY is a dumb terminal.

You execute a remote ls command in PuTTY. The remote ls has a direct access to the remote file system, where the group and owner are two distinct fields. So the ls command knows what is owner name and what is group name. It can then print the formatted line for each file and send it to PuTTY. The PuTTY displays the line only, without any need to understand the line.


What you are saying makes perfect sense. Thank you for explaining it.

Do you mean that there's no way to solve this issue with WinSCP? I suppose I will have to live with it. Thank you again.
martin

Re: Incorrect display of user and group permissions when file owner's name contains one or more spaces

PuTTY does not know anything. PuTTY is a dumb terminal.

You execute a remote ls command in PuTTY. The remote ls has a direct access to the remote file system, where the group and owner are two distinct fields. So the ls command knows what is owner name and what is group name. It can then print the formatted line for each file and send it to PuTTY. The PuTTY displays the line only, without any need to understand the line.
Medalha

Re: Incorrect display of user and group permissions when file owner's name contains one or more spaces

Medalha wrote:

martin wrote:

PuTTY does not even try to understand the listing it just prints it.


So how does Putty correctly align the user and group names when displaying them? If I switch the user and group names, the respective columns are redimensioned to accommodate them. Doesn't this mean that Putty knows which words correspond to user and which correspond to group? It must somehow know when the name begins and when it ends.


The image I'm now uploading shows the two cases I referred to in the quoted post. Putty somehow knows where the owner's name ends, regardless of spaces contained therein, and formats the column width accordingly.
Medalha

Re: Incorrect display of user and group permissions when file owner's name contains one or more spaces

martin wrote:

PuTTY does not even try to understand the listing it just prints it.


So how does Putty correctly align the user and group names when displaying them? If I switch the user and group names, the respective columns are redimensioned to accommodate them. Doesn't this mean that Putty knows which words correspond to user and which correspond to group? It must somehow know when the name begins and when it ends.
martin

Re: Incorrect display of user and group permissions when file owner's name contains one or more spaces

PuTTY does not even try to understand the listing it just prints it.
Medalha

An equivalent slice for WinSCP.
Medalha

In order to provide further information on this subject, I enclose a slice of a screen capture showing Putty's correct display of user and group names containing spaces.
Medalha

Re: Incorrect display of user and group permissions when file owner's name contains one or more spaces

martin wrote:

Thanks for your report. How do you suggest to resolve the problem? I do not think there's a reliable way to parse the listing, if there a space in the a group or owner name.


Thank you for your answer.

I am not a programmer, so I will probably say something irrelevant, but Putty presents the names correctly. Can we "consult" its source to see how it's done there? Or does that case not apply at all to WinSCP?

This "problem" arises, for example, when looking at Samba directories whose files carry Windows permissions, which often contain spaces. The user ID numbers are of course not affected, this is a esthetic problem only. Nevertheless, it would be nice to fix it.
martin

Re: Incorrect display of user and group permissions when file owner's name contains one or more spaces

Thanks for your report. How do you suggest to resolve the problem? I do not think there's a reliable way to parse the listing, if there a space in the a group or owner name.
Medalha

Incorrect display of user and group permissions when file owner's name contains one or more spaces

I just found that when a file owner's name contains one or more spaces WinSCP will send everything after the first space to the column for group permissions. For example, when owner is "domain admins" and group is "domain admins", these permissions will appear as owner "domain" and group "admins domain admins". Another example: "enterprise read-only domain controllers" + "domain admins" will show as "enterprise" + "read-only domain controllers domain admins".

This bug is probably related to the previous bugs 1288/1212. It is present up to version 5.80 Beta.

I must add that Putty 0.66 shows the permissions correctly.

Attached is a session log showing the reported behavior at line 141.

Thank you again four your outstanding work.