Topic "Add X to Directories Doesn't Work Recursively"

Author Message
purefusion
[View user's profile]

Joined: 2009-04-08
Posts: 30
Location: Happyworld Land
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! Smile
Advertisements
purefusion
[View user's profile]

Joined: 2009-04-08
Posts: 30
Location: Happyworld Land
So, what's the verdict on this issue? Do you see it? It's definitely there for SCP connections. Not sure about FTP/SFTP.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
It work's (does not work) for SCP as you describe. It is by design. Documented here, explained sort of here.
purefusion
[View user's profile]

Joined: 2009-04-08
Posts: 30
Location: Happyworld Land
I don't get it. I can easily do this with a SSH command. Why don't you just update the command you're using over SCP to do the same thing?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
What command?
_________________
Martin Prikryl
purefusion
[View user's profile]

Joined: 2009-04-08
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
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.
_________________
Martin Prikryl
Glenn

Guest


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!
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
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License