LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   Cannot open encrypted 7z file (https://www.linuxquestions.org/questions/centos-111/cannot-open-encrypted-7z-file-4175715083/)

notooth 07-26-2022 03:56 PM

Cannot open encrypted 7z file
 
When I clicked an encrypted 7z file in the Files Manager, it did not ask for the password but returned the error "empty archive". Can anyone help?

TB0ne 07-26-2022 04:12 PM

Quote:

Originally Posted by notooth (Post 6370104)
When I clicked an encrypted 7z file in the Files Manager, it did not ask for the password but returned the error "empty archive". Can anyone help?

Since you provide no details at all, no. You don't say how big this file is (does it actually HAVE data in it??), what you're clicking on, in what program, etc.

notooth 07-26-2022 04:22 PM

I clicked on the encrypted 7z file in the Files Manager (Dolphin). The file size is 8KB, and it has data in it.

TB0ne 07-26-2022 04:46 PM

Quote:

Originally Posted by notooth (Post 6370110)
I clicked on the encrypted 7z file in the Files Manager (Dolphin). The file size is 8KB, and it has data in it.

8KB for a 7z file?? Are you *SURE* it has data in it?? And have you tried typing in "7z e <filename>.7z" at the command line??? Tried any other utilities like ark??

Sorry, but 8kb is incredibly small for an encrypted, compressed file that has actual data in it.

notooth 07-26-2022 05:28 PM

The command 7z and Ark can extract the encrypted 7z.

TB0ne 07-27-2022 08:12 AM

Quote:

Originally Posted by notooth (Post 6370117)
The command 7z and Ark can extract the encrypted 7z.

Then you need to go into KDE system settings (assuming you're using that, since you mention Dolphin..you don't actually tell us), and define what program to use for opening 7z files.

John VV 07-27-2022 08:15 AM

8 Kb is a bit on the very small size .
Are you sure this is correct ?

boughtonp 07-27-2022 01:52 PM

Quote:

Originally Posted by TB0ne (Post 6370115)
Sorry, but 8kb is incredibly small for an encrypted, compressed file that has actual data in it.

Quote:

Originally Posted by John VV (Post 6370238)
8 Kb is a bit on the very small size .
Are you sure this is correct ?


I don't understand these remarks. How big does a 7z file have to be before you guys accept it has actual data in it?

I can only assume you do not know how big a 7z file containing a single empty file is? Or an actually empty 7z file (achieved by deleting contents)?

Put differently: the only way an empty archive would appear to be 8KB is on a filesystem with a non-default block size and using a tool that displays disk usage rather than file size. (Such a case is unlikely but could be confirmed with "ls" or "stat".)


An 8 KB archive could easily contain anything from 8,000 bytes to 200,000 bytes of actual data, depending on the file types and compressability.

(This thread has a compression ratio of ~14% - it shrank from ~204KB to ~15KB, whilst three similar-to-each-other HTML files in my home directory had a ratio of ~4% - they shrunk from ~129KB to ~5KB.)

For the record, an actually empty 7z archive is 32 bytes, and Ark will display the message "This archive is empty or Ark could not open its content." whilst for a manually corrupted encrypted 7z file, Ark said "Loading the Archive FILENAME failed with the following error: Listing the archive failed."


TB0ne 07-27-2022 02:15 PM

Quote:

Originally Posted by boughtonp (Post 6370309)
I don't understand these remarks. How big does a 7z file have to be before you guys accept it has actual data in it? I can only assume you do not know how big a 7z file containing a single empty file is? Or an actually empty 7z file (achieved by deleting contents)?

Put differently: the only way an empty archive would appear to be 8KB is on a filesystem with a non-default block size and using a tool that displays disk usage rather than file size. (Such a case is unlikely but could be confirmed with "ls" or "stat".)

An 8 KB archive could easily contain anything from 8,000 bytes to 200,000 bytes of actual data, depending on the file types and compressability. (This thread has a compression ratio of ~14% - it shrank from ~204KB to ~15KB, whilst three similar-to-each-other HTML files in my home directory had a ratio of ~4% - they shrunk from ~129KB to ~5KB.)

For the record, an actually empty 7z archive is 32 bytes, and Ark will display the message "This archive is empty or Ark could not open its content." whilst for a manually corrupted encrypted 7z file, Ark said "Loading the Archive FILENAME failed with the following error: Listing the archive failed."

Understand totally, and it *COULD* have data in it...however, given the lack of information about where the file was obtained or any other pertinent details (post #1), the OP was asked to provide details. If it was downloaded from a website, it's entirely possible that it was corrupted, leading to errors in decompression, especially through Dolphin (which may not have the appropriate program associated to open 7z files by default). That is why I asked if it could be opened with ark or CLI. After the OP confirmed that it could, it was then suggested they associate the appropriate program to the file type in KDE.

Didn't think that given the lack of details from the OP it was inappropriate to confirm the file wasn't corrupted/zero bytes, and could actually be opened with another utility...how would you determine those things without asking???


All times are GMT -5. The time now is 03:40 PM.