tar.gz / tgz corruption in File Galleries downloads
- Status
- Closed
- Subject
- tar.gz / tgz corruption in File Galleries downloads
- Version
- 6.x
- Category
- Regression
- Feature
- File Gallery (elFinder or standard UI)
- Resolution status
- Fixed or Solved
- Submitted by
- Ushindi Gedeon
- Lastmod by
- Ushindi Gedeon
- Rating
- Description
Uploading a .tar.gz or .tgz file seems to go fine. The "tar tzf" command on the back-end file returns the archive's file listing and "gzip -t" does not show any errors. However, downloading the file with Chrome or FireFox into WinRar claims the archive is corrupt. Downloading the same file with IE works just fine. One of the files in question:
http://bartk.us/t/tiki-download_file.php?fileId=30
Feel free to test. I found a bug from 2006 where this was also happening and it suggested turning off gzip output compression. Looking at the performance settings (it used to be in general) I see gzip output compression was already off, so I turned it on. This did not fix the behavior.
Other files (images and a .rar file) are served A-OK, it is just the .tar.gz and .tgz files that screw up. Back-end storage checksum matches the original file:
$ md5sum THD-fig4.tgz /var/www/localhost/htdocs/tikifiles/7271d5da7a5dc935fe2576ef0a427a69
663f408c4dfc6ca864756f70aa2f9f29 THD-fig4.tgz
663f408c4dfc6ca864756f70aa2f9f29 /var/www/localhost/htdocs/tikifiles/7271d5da7a5dc935fe2576ef0a427a69
This means upload is working A-OK it's just the download that's screwing up. I've edited /etc/mime.types to move the "tgz" extension from the default "application/x-gtar" into "application/octet-stream", but this did not help the file corruption. One of the downloaded files is:
-rw-r--r-- 1 eo eo 60247 Jul 16 21:24 THD-fig4 (2).tar.gz
f3e4f281d2041ce2554d343156b4a1ce THD-fig4 (2).tar.gzThe original being:
-rw-rw---- 1 eo eo 60997 Jul 16 20:36 THD-fig4.tgz
The gzip layer looks in tact on the broken file, but the tar layer isn't OK:
eo@jo ~/THD $ gzip -t "THD-fig4 (2).tar.gz"
0
eo@jo ~/THD $ echo $?eo@jo ~/THD $ tar tzf "THD-fig4 (2).tar.gz"
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
eo@jo ~/THD $A little further investigation shows the file is double compressed!
eo@jo ~/THD $ gunzip < "THD-fig4 (2).tar.gz" > "THD-fig4 (2).tar"
eo@jo ~/THD $ file "THD-fig4 (2).tar"
THD-fig4 (2).tar: gzip compressed data, from Unix, last modified: Sat Jul 16 20:36:37 2011
eo@jo ~/THD $ tar tzf "THD-fig4 (2).tar"
THD-fig4-lin-large.gnuplot
THD-fig4-lin.gnuplot
THD-fig4-ranged-large.gnuplot
THD-fig4-ranged.gnuplot
gnuplot.rot
THD.log
THD-ReB=220m-ReS=1m-ReE=221m-RlB=8-RlS=1-RlE=9-VbB=0u-VbS=10000u-VbE=1000000u-IbB=1550000u-IbS=4000u-IbE=1950000u.log
eo@jo ~/THD $Even with the mime type set back to the original "application/x-gtar" this is the case. Even with gzip output compression disabled now and chrome cache cleared, the file still is presented corrupted by the server.
Help!
- Solution
- None
- Workaround
- Importance
- 7
- Priority
- 35
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 3947
- Created
- Sunday 17 July, 2011 04:31:40 UTC
by EO - LastModif
- Thursday 02 July, 2026 09:06:36 UTC