开发者

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

开发者 https://www.devze.com 2023-04-11 12:55 出处:网络
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 the

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.


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


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 ...


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.


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


chmod -R 704 yourDirectoryName

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号