Issue
I setting up my work project permissions in series to:
- 755 for all directories
- 644 for all files
I do it by running next commands:
$ find /path/to/project -type d -exec chmod 0755 {};
$ find /path/to/project -type f -exec chmod 0644 {};
It works fine, but a bit slowly, especially on virtual machines.
Could I improve performance of this tasks in any other way?
Solution
Reference - [https://superuser.com/questions/91935/how-to-chmod-all-directories-except-files-recursively][1]
1.Most of the time consumed here would go in loading the chmod process for every entry. In order to avoid that use xargs-
find /path/to/project -type d -print0 | xargs -0 chmod 755
find /path/to/project -type f -print0 | xargs -0 chmod 644
2.Fortunately, you can opt not to use find
which can make it even faster. The second answer in the reference link explains how to compose a chmod command for your needs
Answered By - b1tchacked Answer Checked By - Timothy Miller (WPSolving Admin)