Thursday, May 5, 2022

[SOLVED] How to change file permission for all sub-directories (CHMOD)

Issue

I've a directory, inside which I've multiple directories each containing several image files.

I want to change the file permissions to 755 for all the sub-directories and the image files inside them.

I'm using WinSCP to connect to the server. So how do I change the file permissions in one go as I can't keep changing one by one since there are lots of files.


Solution

If you have shell access to the server you can execute

chmod -R 755 {DIR}

The -R means recursive.

Edit: If you only have access via WinSCP you should be able to select the files/directories you want and change the permissions recursively



Answered By - nachito
Answer Checked By - Cary Denson (WPSolving Admin)