# HG changeset patch # User Aleksej Bobylev # Date 1543533581 -7200 # Node ID 33dbe879cc21f8623d73d9afc47b83c46a3b355f # Parent 3a513c4ae923b05cef1f2038d08531a06f0dc5b2 modules/compressor: fix ownership & permissions for cached files diff -r 3a513c4ae923 -r 33dbe879cc21 modules/compressor --- a/modules/compressor Thu Nov 29 15:55:14 2018 +0200 +++ b/modules/compressor Fri Nov 30 01:19:41 2018 +0200 @@ -137,8 +137,12 @@ md5=$(md5sum "$2") cachefile="$comp_cache_root/$1/${md5%% *}" echo "$cachefile" + owner=$(stat -c%u:%g "$2") + perms=$(stat -c%a "$2") if [ -f "$cachefile" ]; then ln -f "$cachefile" "$2" + chown $owner "$2" + chmod $perms "$2" echo '+' >> "$cache_stat" else echo '-' >> "$cache_stat"