Archive:Security Guide/7Zip
From FedoraProject
Contents |
Chapter 4, Section 3 - 7-Zip Encrypted Archive
Introduction to 7-Zip Encrypted Archives
7-Zip is a cross-platform, next generation, file compression tool that can also use strong encryption (AES-256) to protect the contents of the archive. This is extremely useful when you need to move data between multiple computers that use varying operating systems (i.e. Linux at home, Windows at work) and you want a portable encryption solution.
7-Zip Installation in Fedora
7-Zip is not a base package in Fedora, but it is available in the software repository. Once installed, the package will update alongside the rest of the software on the computer with no special attention necessary.
Step-by-Step Installation Instructions
- Open a Terminal:
Click Applications -> System Tools -> Terminal
- Install 7-Zip with sudo access:
sudo yum install p7zip
- Close the Terminal:
exit
Step-by-Step Usage Instructions
By following these instructions you are going to compress and encrypt your "Documents" directory. Your original "Documents" directory will remain unaltered. This technique can be applied to any directory or file you have access to on the filesystem.
- Open a Terminal: Click Applications -> System Tools -> Terminal
- Compress and Encrypt: (enter a password when prompted)
7za a -mhe=on -ms=on -p Documents.7z Documents/
The "Documents" directory is now compressed and encrypted. The following instructions will move the encrypted archive somewhere new and then extract it.
- Create a new directory:
mkdir newplace
- Move the encrypted file:
mv Documents.7z newplace
- Go to the new directory:
cd newplace
- Extract the file: (enter the password when prompted)
7za x Documents.7z
The archive is now extracted into the new location. The following instructions will clean up all the prior steps and restore your computer to its previous state.
- Go up a directory:
cd ..
- Delete the test archive and test extraction:
rm -r newplace
- Close the Terminal:
exit
Things of note
7-Zip is not shipped by default with Microsoft Windows or Mac OS X. If you need to use your 7-Zip files on those platforms you will need to install the appropriate version of 7-Zip on those computers. See the 7-Zip download page.
GNOME's File Roller application will recognize your .7z files and attempt to open them, but it will fail with the error "An error occurred while loading the archive." when it attempts to do so. This is because File Roller does not currently support the extraction of encrypted 7-Zip files. A bug report (Gnome Bug 490732) has been submitted.
