Copying permissions one from file to another


chown --reference=file1 file2
chmod --reference=file1 file2

Sources