To retain file permissions we can use czf argument with tar command.
czf
tar
$ tar czf {TAR_NAME}.tar.gz {NAME_DIRECTORY_TO_COMPRESS}
Source: Unix - StackExchangearrow-up-right
Last updated 1 year ago