How to change file permission for all sub-directories (CHMOD)
Asked Answered
V

5

10

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.

Voltammeter answered 5/10, 2011 at 16:8 Comment(1)
Well, either way, it's a form of FTP.Crapshooter
N
10

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

Necromancy answered 5/10, 2011 at 16:10 Comment(1)
Thanks. I've access to the shell. I've changed the permissions. :)Voltammeter
C
3

If you have shell access to your server, you can chmod via the shell.

You recurse with -R:

chmod 755 -R ...

I also like to print the files, so just append a -v if you want to:

chmod 755 -Rv ...
Crapshooter answered 5/10, 2011 at 16:10 Comment(1)
Fixed invalid port number. OP asked for 755 instead of 775.Clowers
K
3

You can do it through FileZilla. Log through FileZilla and right click on the folder and click on change permissions and below you'll find option to change permissions on sub directories and files.

Kerplunk answered 3/12, 2015 at 14:10 Comment(1)
Much obliged for this most noble sire!Unclad
B
2

I've resolve in this way:

mount ftpdir to local with curlftpfs (curlftpfs tutorial):

 curlftpfs -v IP /mnt/ftp/ -o user=<user>:<pass>

and

chmod 755 /mnt/ftp/ -R
Beautiful answered 25/5, 2017 at 20:8 Comment(0)
M
1
chmod -R 704 yourDirectoryName

Owner Can: Execute Read Write, Group: No premissions, Teacher: Read premissions

Modica answered 7/4, 2014 at 14:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.