In this post we will learn to give permission reference to file/dir from other file/dir in linux. For example you have any file and directory and you want to give permission exactly same to other file and directory.
Use the given below syntax:
chmod --reference source-file-dir to target-file-dir
chmod --reference testfile sharad_testfile
for more understanding see the given below screenshot