I have two files in a directory. One has correct permissions and the other has not. Is there a way I can “copy” the set of permissions from one file to another?
Solution:
The GNU version of the chmod utility can copy the mode from one file (RFile) to another (file).
chmod --reference=RFile fileGNU coreutils is found in most Linux distributions and Cygwin, among other places. Not all chmod implementations provide this option.

