Change permissions on files and directories

Advertisement

lloyd_borrett
Guest

Change permissions on files and directories

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,317
Location:
Prague, Czechia

Re: Change permissions on files and directories

Use change properties function, set the permissions to 644 and make sure the Add X to directories option is enabled.
_________________
Martin Prikryl

Reply with quote

marty.mcgee
Guest

Re: Change permissions on files and directories

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!

Reply with quote

ryanv
Guest

is this also available via command prompt? i need to change to permission (CHOWN / CHMOD) of the directory using batch file?

Reply with quote

Advertisement

ron423d
Joined:
Posts:
3
Location:
UK

this is NOT working on version 5.9.2 -

right click (on public_html), choose properties,

set octal to: 0644

check "Add X to directories"

check "set O,G, permissions recursively"

click OK,

Result: Public_Html is set properly to 0755 (good)
Files in Public_Html are set properly to 0644 (good)

any subfolders below Public_html are not changed (ie NOT set to 0755, but set to 0644). (not good)

(ie /public_html/image/ set to 0644 , even though its a directory and should have been set to 0755 )

thus recursive part + add X to directories is not working.....

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,317
Location:
Prague, Czechia

ron423d wrote:

this is NOT working on version 5.9.2 -
What protocol?

Reply with quote

ron423d
Joined:
Posts:
3
Location:
UK

martin wrote:

ron423d wrote:

this is NOT working on version 5.9.2 -
What protocol?

SCP
(should have included that in my post)

Reply with quote

Advertisement

You can post new topics in this forum