how to copy permissions from one folder to another linux code example
Example: linux copy directory permissions to another directory
chown --reference=otherfile thisfile
chmod --reference=otherfile thisfile
chown --reference=otherfile thisfile
chmod --reference=otherfile thisfile