Topic "Change permissions on files and directories"

Author Message
lloyd_borrett

Guest


G'day,

I've used WinSCP to transfer a Tar/GZip from a Windows XP system to a Linux system.

When expanded to the Linux system, the permissions on files are set to 640 not 644, and the directories aren't being set to 755.

Is there a way to specify this in WinSCP?

Or is there a way to quickly change a complicated directory structure to have files set to 644 and directories to 755?

I've already worked out how to change the permissions manually. But it's not a practical solution if the structure transferred is complicated. Can you imagine how long it would take to go through say a phpBB or WordPress install and change the permissions of all of the files and directories manually?

Would there be a way using WinSCP, to recursively go through a directory structure and set files to 644 and directories to 755?

Or if not using WinSCP, some other solution?

Best Regards, Lloyd Borrett.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25952
Location: Prague, Czechia
Use change properties function, set the permissions to 644 and make sure the Add X to directories option is enabled.
_________________
Martin Prikryl
marty.mcgee

Guest


martin wrote:
Use change properties function, set the permissions to 644 and make sure the Add X to directories option is enabled.


This works! Just make sure to also check Set group, owners, and permissions recursively so that this happens to all sub-files and sub-directories: sub-files are assigned 0644 and sub-directories are assigned 0755 (which is 0644 plus 0111, or "X on directories"). Perfect, thanks!
ryanv

Guest


is this also available via command prompt? i need to change to permission (CHOWN / CHMOD) of the directory using batch file?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25952
Location: Prague, Czechia
ryanv wrote:
is this also available via command prompt? i need to change to permission (CHOWN / CHMOD) of the directory using batch file?

There's chmod:
https://winscp.net/eng/docs/scriptcommand_chmod

There's no chown.
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