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: hidden dirs treated as files using recursive permissions

Brianswilson wrote:

The log and screen shots were attached to earlier messages. I think that should be what you were asking for.

OK, sorry. I did not read your Word document carefully. With SCP protocol, when you check both "recursively" and "Add X to directories", WinSCP does two separate operations. First it recursively sets the selected permissions and then it adds X non-recursively. As the first operation failed and you hit Abort, the second operation was never done. Had you pressed Skip, it would continue.

The documentation says (https://winscp.net/eng/docs/ui_permissions#other_options):
On [the] Properties dialog[,] the option is available only when there is at least one directory selected. Also it will not work for SCP protocol for sub-directories of [the] selected directories.

The checkbox is disabled, if you check “execute” permissions explicitly for all permission groups, as it makes it effectively useless.
[missing grammar supplied] Bold face is my choice for emphasis.

Correct. It says, "checkbox is disabled, if you check “execute” permissions explicitly for all permission groups". You did not check any "X" checkbox. So the Add X to directories was not disabled. Maybe it's not phrased clearly. Feel free to fix it.

Thanks for your grammar corrections, I have edited the page accordingly. Feel free to fix any grammar on the wiki.
Brianswilson

Re: hidden dirs treated as files using recursive permissions

The log and screen shots were attached to earlier messages. I think that should be what you were asking for.

The documentation says (https://winscp.net/eng/docs/ui_permissions#other_options):
On [the] Properties dialog[,] the option is available only when there is at least one directory selected. Also it will not work for SCP protocol for sub-directories of [the] selected directories.

The checkbox is disabled, if you check “execute” permissions explicitly for all permission groups, as it makes it effectively useless.
[missing grammar supplied] Bold face is my choice for emphasis.

The "execute" check box was not disabled when I selected the "SCP" protocol option (perhaps I'm misreading meaning of this paragraph). This is minor, though annoying, and the documentation explains what is going on as far as the recursive changes to sub-directories and files under the .ssh directory.

The issue of the .ssh directory itself being left with 600 permissions when 700 was selected for directories is something I feel is an error, even if the SCP protocol is selected. It is not a high severity issue since there is an easy work around. I wouldn't make this a high priority issue either.
martin

Re: hidden dirs treated as files using recursive permissions

Brianswilson wrote:

Thank you for the information. The documentation says the option should be grayed out for the SCP protocol; but when I use SCP, it remains active. Perhaps this needs to be looked at in the latest release?

Where does the documentation says that?

Also the option leaves the .ssh directory with 0600 permissions, not the 0700 permissions that should be set for the selected directory (with the "Add X" option). Even if SCP won't operate recursively, it should work on the selected directory and leave it with 0700 permissions.

That's right. Can you please attach a screenshot of properties dialog before you submit it along with matching session log file?
Brianswilson

Re: hidden dirs treated as files using recursive permissions

Thank you for the information. The documentation says the option should be grayed out for the SCP protocol; but when I use SCP, it remains active. Perhaps this needs to be looked at in the latest release?

Also the option leaves the .ssh directory with 0600 permissions, not the 0700 permissions that should be set for the selected directory (with the "Add X" option). Even if SCP won't operate recursively, it should work on the selected directory and leave it with 0700 permissions.
martin

Re: hidden dirs treated as files using recursive permissions

I assume that you are using Add X to directories option, right? With SCP protocol it does not work recursively (With other protocols it is).
See https://winscp.net/eng/docs/ui_permissions#other_options
Brianswilson

Update.

WinSCP Version 5.5.4 (Build 4433) on Windows 7 Pro connected to a RedHat Linux system. New WinSCP installation. SCP protocol using GUI. See attached debug 2 session log.
Guest

WinSCP Version 5.5.4 (Build 4433) on Windows 7 Pro connected to a RedHat Linux system.
Brianswilson

hidden dirs treated as files using recursive permissions

WinSCP appears to be treating hidden directories as if they were files when the recursive option is used. When I Right Click, and select "Properties" to recursively set .ssh directory and file permissions to 0700 and 0600 respectively (.ssh directory initial permissions are 0755), the action fails and the .ssh directory is left with 0600 permissions.

I can select the directory individually (without selecting "Set group, owner and permissions recursively" option and change the directory permissions without an error. If I specify 0600 permissions and choose the "Add X to directories" option for the .ssh directory, without the "Set group, owner and permissions recursively" option, there is no error. Only when the recursive option is selected is there a permissions error.

I could not find a similar known issue so I’m reporting this here as a bug. The following screen shots show the action and its results.

Results error message:

Command 'chgrp -R "bwilson" ".ssh"' failed with return code 1 and error message
chgrp: cannot access `.ssh/.PUBLIC KEYS': Permission denied
chgrp: changing group of `.ssh/authorized_keys': Permission denied
chgrp: changing group of `.ssh/authorized_keys.bak': Permission denied
chgrp: cannot access `.ssh/.DO NOT REMOVE': Permission denied.


The .ssh directory is left with 0600 permissions when I click on the abort button.