Answer the question
In order to leave comments, you need to log in
How to set permissions to directories only in Linux?
There is a site on which it is necessary to set different rights to directories and files. There are many directories, and even more files in them, so it is inconvenient to assign rights to each of them. Is it possible to recursively set permissions on files only or only on directories in Linux?
Articles on the Internet describe the chmod command in some detail, but for some reason they do not cover such situations.
Answer the question
In order to leave comments, you need to log in
of course. In Linux, you can do everything and a little more :)
find /path/to/req -type d -exec chmod 0755 {} \;
find /path/to/req -type f -exec chmod 0644 {} \;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question