This question already has an answer here:
How do I copy all the folder, subfolders and files permissions (recursively) from
/www_03062018 to my new
I came across this post: Clone permissions for all files in a folder
chmod --reference=RFile file
Which didn't help much, it did apply a change for the main folder
/www but didn't apply on its subfolders and files.
i have tried:
chmod -R --reference=/www_03062018 /www
and it didn't work.
I have 2 folders on my Ubuntu machine:
/www is a "git clone" from the production machine.
/www_03062018 is my old directory that i used to work on and upload files via FTP.
I started to use GIT and when I clone a directory - all its folder ownerships and file accesses settings doesn't get cloned too.