[GH-ISSUE #79] corrupted files in zipped files #34

Closed
opened 2026-04-08 16:49:56 +03:00 by zhus · 14 comments
Owner

Originally created by @juliangaal on GitHub (Jun 29, 2022).
Original GitHub issue: https://github.com/sigoden/dufs/issues/79

I'm experiencing issues when extracting files form an zip-archive. Downloading the individual .jpg files works fine, but they become corrupted during the zipping process and/or download.

Version: 0.22.0
OS: Ubuntu 18.04
Browser: FF 99.0

Originally created by @juliangaal on GitHub (Jun 29, 2022). Original GitHub issue: https://github.com/sigoden/dufs/issues/79 I'm experiencing issues when extracting files form an zip-archive. Downloading the individual .jpg files works fine, but they become corrupted during the zipping process and/or download. Version: 0.22.0 OS: Ubuntu 18.04 Browser: FF 99.0
zhus closed this issue 2026-04-08 16:49:56 +03:00
Author
Owner

@sigoden commented on GitHub (Jun 29, 2022):

cloud you post the log?

<!-- gh-comment-id:1169621774 --> @sigoden commented on GitHub (Jun 29, 2022): cloud you post the log?
Author
Owner

@sigoden commented on GitHub (Jun 30, 2022):

Closing this issue due to lack of information. If anyone else encounters the same problem, welcome to reopen this issue。

<!-- gh-comment-id:1170859461 --> @sigoden commented on GitHub (Jun 30, 2022): Closing this issue due to lack of information. If anyone else encounters the same problem, welcome to reopen this issue。
Author
Owner

@juliangaal commented on GitHub (Jun 30, 2022):

As far as I can tell from your logger.rs file you only log to stdout, so here you go:

Listening on:
  http://127.0.0.1:5000/
  http://172.17.0.1:5000/
  http://192.168.178.180:5000/
  http://[::1]:5000/
  http://[2003:cf:af3b:2500:1131:9987:7c10:32e9]:5000/
  http://[2003:cf:af3b:2500:1743:830c:e9fb:2204]:5000/

2022-06-30T10:15:13+02:00 INFO - 127.0.0.1 "GET /airbnbirgit/?zip" - 200

Are you writing to a logfile I can attach?

EDIT: issue persists in 0.23.0

<!-- gh-comment-id:1170911812 --> @juliangaal commented on GitHub (Jun 30, 2022): As far as I can tell from your logger.rs file you only log to stdout, so here you go: ``` Listening on: http://127.0.0.1:5000/ http://172.17.0.1:5000/ http://192.168.178.180:5000/ http://[::1]:5000/ http://[2003:cf:af3b:2500:1131:9987:7c10:32e9]:5000/ http://[2003:cf:af3b:2500:1743:830c:e9fb:2204]:5000/ 2022-06-30T10:15:13+02:00 INFO - 127.0.0.1 "GET /airbnbirgit/?zip" - 200 ``` Are you writing to a logfile I can attach? EDIT: issue persists in 0.23.0
Author
Owner

@sigoden commented on GitHub (Jun 30, 2022):

Is the zip format incompatible with mac? I have test linux and macos, No problem found。

<!-- gh-comment-id:1170925910 --> @sigoden commented on GitHub (Jun 30, 2022): Is the zip format incompatible with mac? I have test linux and macos, No problem found。
Author
Owner

@juliangaal commented on GitHub (Jun 30, 2022):

Well, I am on ubuntu 22.04 and tested with ff and chromium. Can't access MacOS to test.

<!-- gh-comment-id:1170942129 --> @juliangaal commented on GitHub (Jun 30, 2022): Well, I am on ubuntu 22.04 and tested with ff and chromium. Can't access MacOS to test.
Author
Owner

@sigoden commented on GitHub (Jun 30, 2022):

Cloud you zip some unimportant files to reproduce the problem, then upload that zip file to this github issue?

<!-- gh-comment-id:1170944799 --> @sigoden commented on GitHub (Jun 30, 2022): Cloud you zip some unimportant files to reproduce the problem, then upload that zip file to this github issue?
Author
Owner

@juliangaal commented on GitHub (Jun 30, 2022):

The original zip-file was filled with images, and my image viewer simply stated "Failed to open input stream for reading" when attempting to unzip it, which, to me, sounded like a zipping issue.

I tried to reproduce the issue with text files, but my text editor states that it's a permissions issue, because it doesn't have the permission to open the files!

I'm not sure where the permissions get mixed up however. I start the dufs binary without sudo, from my standard user account with dufs -A (just testing, everything on localhost), so dufs should be running as the standard user. Are any permissions changed, or maybe transfered incorrectly, during the upload process or zipping?

<!-- gh-comment-id:1170967687 --> @juliangaal commented on GitHub (Jun 30, 2022): The original zip-file was filled with images, and my image viewer simply stated "Failed to open input stream for reading" when attempting to unzip it, which, to me, sounded like a zipping issue. I tried to reproduce the issue with text files, but my text editor states that it's a permissions issue, because it doesn't have the permission to open the files! I'm not sure where the permissions get mixed up however. I start the `dufs` binary without sudo, from my standard user account with `dufs -A` (just testing, everything on localhost), so dufs should be running as the standard user. Are any permissions changed, or maybe transfered incorrectly, during the upload process or zipping?
Author
Owner

@sigoden commented on GitHub (Jun 30, 2022):

The user:group of files created by dufs is same to user:group that runs dufs. dufs won't mixup permissions.

The permissions of the unzipped files are controlled by the unzip tool and the user:group runs the tool.

Your may try online unzip tool like https://m.ezyzip.com/unzip-files-online.html

<!-- gh-comment-id:1170991875 --> @sigoden commented on GitHub (Jun 30, 2022): The user:group of files created by dufs is same to user:group that runs dufs. dufs won't mixup permissions. The permissions of the unzipped files are controlled by the unzip tool and the user:group runs the tool. Your may try online unzip tool like https://m.ezyzip.com/unzip-files-online.html
Author
Owner

@juliangaal commented on GitHub (Jun 30, 2022):

The online tools works perfectly, no issue with extracting the files.

Using unzip from the terminal also results in the same issue. Very strange. No idea where to go from here, honestly.

<!-- gh-comment-id:1170996627 --> @juliangaal commented on GitHub (Jun 30, 2022): The online tools works perfectly, no issue with extracting the files. Using unzip from the terminal also results in the same issue. Very strange. No idea where to go from here, honestly.
Author
Owner

@sigoden commented on GitHub (Jun 30, 2022):

Could you post the version information of your unzip tool?

run unzip -v to print version info

<!-- gh-comment-id:1171004652 --> @sigoden commented on GitHub (Jun 30, 2022): Could you post the version information of your unzip tool? > run `unzip -v` to print version info
Author
Owner

@sigoden commented on GitHub (Jun 30, 2022):

I found the problem, the mode of the files in the zip file are all been set to 000. So there will are permission problems in linux.

Your unzip tool is fine.

<!-- gh-comment-id:1171011679 --> @sigoden commented on GitHub (Jun 30, 2022): I found the problem, the mode of the files in the zip file are all been set to `000`. So there will are permission problems in linux. Your unzip tool is fine.
Author
Owner

@sigoden commented on GitHub (Jun 30, 2022):

Thank you for helping me find the problem

<!-- gh-comment-id:1171012582 --> @sigoden commented on GitHub (Jun 30, 2022): Thank you for helping me find the problem
Author
Owner

@juliangaal commented on GitHub (Jun 30, 2022):

No problem, thank you, too. Let me know when it's fixed, I'll test the new release ASAP.

<!-- gh-comment-id:1171014062 --> @juliangaal commented on GitHub (Jun 30, 2022): No problem, thank you, too. Let me know when it's fixed, I'll test the new release ASAP.
Author
Owner

@juliangaal commented on GitHub (Jun 30, 2022):

works like a charm! Thanks for the quick response

<!-- gh-comment-id:1171139750 --> @juliangaal commented on GitHub (Jun 30, 2022): works like a charm! Thanks for the quick response
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#34