Issue
Is it better to gzip a file before or after applying chmod to it.
If I apply the chmod, then gzip it, and then unzip it, will it maintain the chmod?
id='dv3'>
Solution
From man gzip
:
gzip preserves the mode, ownership and timestamps of files when compressing or decompressing.
In other words, when compressing, the compressed file will have the same ownership and permissions as the original file. When uncompressing, the uncompressed file will have the same ownership and permissions as the .gz file.
So, no, it doesn't matter in which order you gzip or chmod.
Answered By - John1024 Answer Checked By - Pedro (WPSolving Volunteer)