Add X to Directories Doesn't Work Recursively

Advertisement

purefusion
Joined:
Posts:
30
Location:
Happyworld Land

Add X to Directories Doesn't Work Recursively

When I'm setting permissions on a folder (or group of selected folders), and I choose both "Add X to directories" and "Set group, owner and permissions recursively"... WinSCP only adds X to the selected folders, not the folders of the recursive list of directories/files.

This has been a bug for some time, and it's really graining on me now. Please fix this as soon as possible. Thanks! :)

Reply with quote

Advertisement

Advertisement

purefusion
Joined:
Posts:
30
Location:
Happyworld Land

Don't you send a SSH command over the SCP connection to accomplish the ownership and permission modifications? chown, chmod, etc? If you modify your chown/chmod command to use "find" similarly to my SSH command below, it might help fix this issue:

WinSCP Syntax: find !/ -type d -exec chmod -v !?chmod:?755! {} \
Normal Syntax: find /some/path/ -type d -exec chmod -v 755 {} \

-type d essentially means "only apply the exec'd command to directories"
-type f would mean "only apply the exec'd command to files"

everything after -exec gets applied as a command to those directories or files (depending on the -type). In this case: chmod -v 755

I've never seen a server this hasn't worked on.

Reply with quote

martin
Site Admin
martin avatar

I'm not sure if I would dare to change the command to something that complicated, because of compatibility reasons. My policy is not to touch SCP anymore anyway.

Reply with quote

Glenn
Guest

Suggestion

purefusion wrote:


[...]
WinSCP Syntax: find !/ -type d -exec chmod -v !?chmod:?755! {} \
Normal Syntax: find /some/path/ -type d -exec chmod -v 755 {} \
[...]

purefusion, I'm using your command as a custom command in WinSCP, and it works like a charm, with one small change :
I had to add ; at the end, otherwise the command would fail with "find: missing argument to -exec"

So the working command for me is :
find !/ -type d -exec chmod -v !?chmod:?755! {} \;

Thanks for your help!

Reply with quote

Guest

Uhm guys...i got a question too i'm afraid..
I just recently switched from Vista to Windows 7 on my laptop, and on Windows Vista i had no problems with Winscp, But today i wanted to do some stuff....And i filled excact the same IP and root and alpine, and he refuses to give me entrance.
I checked my wifi. it's the same as my computer. Doesn't Winscp work in Windows 7? Can
anyone please tell me what to do ASAP

Reply with quote

Advertisement

You can post new topics in this forum