Mac os compress with password

How to create and password protect a zip file on macOS

Tax time is here and many of us will be sharing sensitive information from our financial institutions with our accountants. If there was ever a time to vigilant with securing your private data, this would the moment! Here’s how you can create a compressed zip file with your sensitive data and password protect it on natively macOS.

Prep your files

Since we’ll be using the terminal application that is native on macOS, you’ll want to make the compression of your files as simple as possible to avoid long strings of commands. So if you have multiple files for compressing and protecting, you can organize them into a single folder using Finder.

    Open Finder.

Option-click the Finder window and create a New Folder.

  • Rename the folder, preferably something without spaces as this will make terminal commands simpler for you.
  • Drag and drop your sensitive files into the new folder.
  • Once you have your files in the generated folder, you can now go on to the business of compressing and password protecting the files. Note that if you are e-mailing files, most e-mail providers have a limit on attachment sizes. Secondly, some companies disallow the reception of compressed files via e-mail due to people unknowingly opening malware and as such, your attachment may get stripped and the e-mail server. You’ll need another method to transfer your files such as via Dropbox.

    The terminal

    Since Finder doesn’t have a native password protection option, we’ll have to go deeper under the skin of macOS and straight up a terminal window.

    1. Using Spotlight, type in terminal.
    2. Change your directory to the location of your folder. For example, in my instance that would be to type cd /Volumes/dataMAC and hit enter.
    3. Type in ls to make certain you see your folder.
    4. Now type in the command that will simultaneously compress and password protect the files in the form of zip -er FILENAME.zip FILESorFOLDERStoCOMPRESS.
    5. In my example that would be zip -er Mytaxes.zip ForTaxes/.
    6. Hit return/enter.

    Next, you’ll be prompted with a password prompt. Type in the password you want to use to protect the files. Enter the password twice.

    Enter your password.

  • The file will be uncompressed into the same directory.
  • Final comments

    This compression and password protection is agnostic to the desktop operating system so you can send it to Window users, Linux users and of course Mac users. Let us know what other ways you use compression and password protection of your files on macOS in the comments.

    Video game manuals are going extinct, and need to make a comeback

    Video game manuals let developers convey their passion and help gamers grow to love their games. But these important aspects of the gaming experience seem to be disappearing. Do gaming manuals need to make a comeback?

    Review: Speck’s Presidio2 Grip is new and improved, now with MagSafe

    Protect your iPhone 13 Pro in a slim, grippy case without sacrificing your MagSafe accessories.

    Apple manufacturers ‘scrambling’ to combat power supply issues in China

    A new report says major suppliers of companies like Apple are «scrambling» to keep production on track as China is hit by power shortages.

    Fit out your music studio with all the gadgets that work best for Mac

    Getting original music out of your head and onto your Mac can be quite the process. You’ll need the right tools to make music, record it, and then edit it on your Mac.

    Источник

    How to set password for documents and ZIP files on Mac OS X without additional app

    Please Subscribe to our YouTube Channel

    Making a ZIP file on MacBook or iMac is very easy; Just put the multiple files in one folder, right-click on the folder, and click Compress. However, that ZIP file can be opened by anyone. Today we will know how to set the password to protect a ZIP file and documents on Mac OS X without any additional app. You can share such files even on the internet, but only those can open who know the password.

    Читайте также:  Центр обновления windows не находит обновления windows 10

    How to set password to Protect a ZIP file on Mac OS X using terminal

    For Zipping a folder with password

    zip -er [archive] [folder]

    For Zipping a file with password

    zip -e [archive] [file]

    For example: If you are zipping a folder (folder name : Smartphones) from Documents folder, and want the output on Desktop as Archive.zip. You would type this command

    Once you Press Enter, it will ask for the password and then ask to confirm (password won’t show in the terminal when you type), now press Enter again, and it should be done if you have not made any error.

    However, when you open the zip file with password, target folder would be located like; Users –> UserName –> Desktop –> TargetFolder

    So this is not what you want, do you? Just the target folder should be zipped, not the folders under empty folders. In this case, you need to create password protected ZIP File under the same path where your source file is. For example, MyDocument folder is located under Documents folder, then create the ZIP file under Documents folder as well.

    Here is the solution

    • Launch terminal (From Application –> Utility
    • Go to the folder where your target file is. By default, you should be on Home Folder. It looks like this in my case Zoheb:

    Zoheb$

  • type cd FolderName (FolderName is the name of the folder/location where you have put the folder that you want to zip). It could be; cd Desktop OR cd Documents Or cd Movies, and so on…
  • Once you are there, type command to zip a folder with password; zip -er DesiredFileName.zip FolderName
  • Use this command in case of File; zip -e DesiredFileName.zip FileName
  • Screenshot of Zipping a Folder with password

    Screenshot of Zipping a File with Password

    If you still face any issue, please comment below, and you would get a reply as soon as we can.

    Setting Password for documents, like Pages, Keynote

    You don’t need to zip your documents or write any command via terminal if you want to set a password for a specific document only. If you are preparing a document or have already prepared, follow these steps;

    • Make sure your document is open
    • Click on File
    • Click on Set Password
    • You will get another window where you need to put the desired password, and confirm it. You can set password hint as well if you want. If you want KeyChain to store this password, check the box as well
    • Click on Set password, and you are done

    MacPaw’s Hider 2: The Best Alternative With Enhanced Features

    Hider 2 Application from MacPaw is the best alternative to protect files, folders, media, notes etc. Here are some very useful features of Hider 2 Application.

    • It protects all type of files, videos, music, documents, folders, zip etc. You can even hide folders without zipping them.
    • You can make password protected Notes and keep all the information secure
    • It also supports external storage
    • Hider 2 Protects Files and Notes with AES-256 Encryption and Password

    How to use Hider 2 Application to Protect Files, Folders, and Notes

    • Download Hider Application from MacPaw
    • Launch the app and type a password to protect files

    • Click on Create Vault option and choose a destination folder where you want to keep the shortcut of the Hider 2 app
    • Now you can drag and drop any type of files to the Hider App and make sure visible option is disabled. It will hide the files now, and they can be accessed via Hider 2 app only. However, no one can access without entering the password

    • If you want to create a secured password protected note, you can simply click on All Notes option and then hit the + sign to create a note

    Источник

    Password Protect Zip Files in Mac OS X

    Creating a password protected zip file is easy in Mac OS X and does not require any add-ons or downloads. Instead, use the zip utility that is bundled with all Macs.

    This offers a simple way to protect a zip archive file from unwanted viewing access, as when a user attempts to decompress the contents of the zip archive, the correct password must be entered in order for the archive to extract.

    How to Password Protect a Zip File from Mac OS X Command Line

    If you’re familiar with the command line, the syntax of the encrypted zip command is as follows:

    zip -e [archive] [file]

    For encrypting multiple files with a password, such as folder or an entire directory, the syntax would be as follows:

    zip -er [archive] [folder]

    If you’re not sure how to use that, read on to learn how to create zip archives encrypted with passwords. These encrypted zip files will maintain password protection across platforms, meaning you can send a protected zip file to a Windows user and they will still need to enter the password in order to view the contents.

    Set a Zip Password in Mac OS X

    You can create password protected archives of files and folders:

    1. Launch the Terminal from the Applications > Utilities folder
    2. Type the following command:

    zip -e archivename.zip filetoprotect.txt

  • Enter and verify the password – don’t forget this
  • The resulting archive, in this case named “archivename.zip”, is now encrypted with the password provided. The file that was encrypted, “filetoprotect.txt”, is now inaccessible without entering that password.

    If you plan on compressing multiple files within a folder, you will want to slightly modify the command with the -er flag like so:

    zip -er archive.zip /path/to/directory/

    This is particularly important for encrypting zips of multiple files under OS X Mavericks.

    Example: Zipping a Folder and Setting a Password

    Here is an example of what this will look like from the command line, in this case we are compressing and password protecting the entire ‘Confidential’ folder located within the users /Documents directory, and the password protected zip is being placed on the users desktop for easy access:

    /Documents/Confidential/
    Enter password:
    Verify password:
    adding:

    /Documents/Confidential/ (deflated 13%)

    Notice the password will not display, this is normal behavior for the Terminal.

    Notice that with a folder of multiple files, you will want to use the -er flag, the addition of the r indicates that zip will recursively compress and password protect all files in the folder.

    Opening the Password Protected Zip

    Despite being created at the command line, you do not need to unzip the file from the terminal, it can be expanded from the Mac OS X Finder or within Windows using standard unzipping apps. Just double click on the file, then enter the password, and it will decompress. You can also decompress the zip archive from the command line with:

    Here are some use cases for password protected zip archives:

    • Password protecting an individual file or directory
    • Sending a sensitive and encrypted file over an unencrypted network
    • Emailing confidential data to a Windows user
    • Adding an additional layer of security to a hidden folder
    • Password protecting your own backups, outside of Time Machine

    While this can provide some protection on a per-file or folder basis, it’s always a good idea to password protect the Mac in general with a login requirement on system boot, wake from sleep, and waking from the screen saver.

    Keep in mind that password protected zip files are not encrypted with some super strong deep encryption method, so if you want a more secure file encryption, you may want to pass a regular zip file through openSSL encryption with des3 or something similar to really make the file secure.

    Enjoy this tip? Subscribe to our newsletter!

    Get more of our great Apple tips, tricks, and important news delivered to your inbox with the OSXDaily newsletter.

    Thank you!

    You have successfully joined our subscriber list.

    63 Comments

    Please note that the zip program in Mac OS X only implements the old weak legacy PKZip 2.0 encryption algorithm (also called ZipCrypto). It has known security vulnerabilities. You should never use it today!

    If you want to create encrypted zip files using the much more secure AES-256 encryption algorithm, you need to use third party software, such as BetterZip. (On Windows you can use WinZip, WinRAR, 7-Zip etc).

    ROTFL XD
    Here it is – great Apple OS X, where you have to launch console to archive ZIP with password XDDDDDDDD

    Thank you, not bulletproof but super handy and suits my needs!

    The great thing about Mac OS is that “it just works.”

    Why do we need to do anything anymore via command line. Surely Apple include a GUI way of doing this? Suddenly feels like a time warp back to the 1990’s….. I had a go at the command line approach and failed. Any help most welcome!!

    Thank you. I spent too much time trying to do this yesterday based off other website pages and blogs, yours was so straightforward. Will sleep so much better tonight 🙂

    So, am I correct in believing there is no built-in way to do this from the GUI without using third-party software?

    The problem with all of these password procedures is that gmail will not allow you to attach a file that is a zip file within a zip file.

    Compressing the file first and then password protecting it causes gmail to see it as a zip file within a zip file and it won’t let you attach it.

    Installing keka worked for me.

    Didn’t work at all for me on OSX Yosemite. Not with the full path to the file, nor with cd to it’s directory. Got three error messages in the terminal:

    zip warning: missing end signature–probably not a zip file (did you
    zip warning: remember to use binary mode when you transferred it?)
    zip warning: (if you are trying to read a damaged archive try -F)

    Got it! You don’t cd to the directory but one level up.

    worked like a charm, thanks! great way to send tax info around. kinda makes me feel like a paranoid ninja, but you know what they say about an ounce of prevention…

    Sorry, this isn’t working for me: here’s the text of my attempt:

    xxxxx$ zip -e xmisc.zip filetoprotect.txt
    Enter password:
    Verify password:
    zip warning: name not matched: filetoprotect.txt

    What have I done wrong here?

    Mike Flugennock (and anyone else who cares) in the same terminal window where you entering the zip command, at the prompt enter “ls filetoprotect.txt” (minus the quotes) and if you get “no such file or directory” that means you are not in the directory (“folder”) where the file is.

    You have to cd (change directory) to where the file is or specify the full path. If there are spaces in the path surround the entire file name with double-quotes (“) or put a backslash ‘\’ before each space as in file\ to\ protect.txt for “file to protect.txt”.

    Better yet, before you hit return (enter) type the Tab key. Terminal will beep at you if it can’t find a file matching the name. As a matter of fact, if you type “zip -e xmisc.zip filetopr” (minus the quotes and then type the Tab key if the file exists Terminal should fill in the rest of the name for you assuming only one match or it will beep if more than one file matches.

    (Note, above, ls is lowercase el, lowercase ess as in the first and third letter of list – not the numeral one ‘1’ which depending on the font might look the same… and terminal requires the correct character case.)

    Sorry, that’s a lot of info to digest – and I only come here when researching so if you ask I may not reply.

    What I want is an automator workflow finder addon that allows me to right click a zip and add a password.

    I too am having problems making this work in Snow Leopard. I can successfully create an encrypted ZIP file of a PDF. And I can successfully unzip using Terminal and entering my password. However I cannot simply double click the ZIP file for it to unzip. I get an error (Error 1 – Operation not permitted). This leaves me to believe it is a Permissions problem, as suggested above. The permissions for my Desktop are read only for everyone other than the owner (me). How and where should I store the PDF and subsequent ZIP to allow full permissions. I dont want to get into messing around with Desktop permissions, it’s a slippery slope to never ending problems in my experience.

    hi all, the article above says: “These encrypted zip files will maintain password protection across platforms, meaning you can send a protected zip file to a Windows user and they will still need to enter the password in order to view the contents.”
    I cannot confirm that password protection is working cross platforms.
    I have used the terminal command “zip -er [archive] [folder]” as advised above under OS X Mavericks. A password protected archive.zip was created as expected. To extract the ZIP-file in Mavericks I had to enter the password as expected. But the I moved the ZIP-file to Dropbox and downloaded it with Windows Vista. Clicking the ZIP-file showed immediately the files in the contents of the archive, without any need to enter a password.
    Trying to open one of the files in the content caused a window to open asking for the password (on file-level not on archive-level). After I entered the password as used for creating the archive under Mavericks resulted in an error message like “the file cannot be opened, it may be damaged”. Using Microsoft OneDrive instead of Dropbox resulted in the same behavior. I am too lazy to test now the other way round, if I would create a password protected ZIP-archive in Windows and send this one to Mavericks but I would expect this way to work. My conclusion: it seems like the Apple way does not keep the conventions.
    Regards, Claus

    ZIP is a generic archive format that is readable by OS X, Windows, Linux, and many other platforms. An archive made in one operating system is able to open in other operating systems, whether it is password protected or not. Be sure the file did not get corrupted in the transfer process, and be sure to use a compatible zip archive opener utility (on Windows you can try something like WinZIP if you have troubles)

    Had the same precise situation with Yosemite.

    Источник

    Читайте также:  Linux видит только свою файловую систему
    Оцените статью