O
O
Optimus2015-08-31 10:51:59
SSH
Optimus, 2015-08-31 10:51:59

How to recursively change chmod permissions?

In the current folder for php files:
chmod 644 *.php
In the folder folder for all files:
find folder/ -type d -exec chmod 644 {} \;
How can I change the rights of all files in the folder folder and all files of all folder subfolders and so on to unlimited depth?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
magazovski, 2015-08-31
Pyan @marrk2

man chmod

...
   -R      Change the modes of the file hierarchies rooted in the files
             instead of just the files themselves.
...

chmod -R 644 folder/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question