how to copy permissions from one file to another in 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