How to password protect a file or folder on macOS.

Encryption is the most reliable way to protect sensitive information. Encrypted files and folders cannot be opened or viewed without entering a password.

Now I will tell you about three ways to encrypt any photos, videos or documents:

  1. Creating encrypted folders through macOS Disk Utility;
  2. Creating an encrypted USB flash drive;
  3. Encrypt any files and folders using the Encrypto utility.

What is file encryption

Encryption is the conversion of a file using a specific algorithm. Such a file cannot be opened and viewed until you enter the decryption key. In our case, the key is a regular password that you come up with when encrypting the file.

1. How to put a password on a folder

You can encrypt folders using standard macOS tools. For this:

  1. Click File ▸ New image ▸ Image from folder... and select the folder you want to put a password on;
Creating an encrypted image (folder) through macOS Disk Utility
  1. In the window that appears, specify the encryption algorithm 256 bit AES, as well as the image format Read/Write. The latter is necessary so that in the future you can add or remove files from the encrypted folder.

When you select an encryption algorithm, you will also be asked to enter a password.


Be sure to select “read/write” when creating the encrypted image. This way you can add new files to it
  1. After a few seconds, the encrypted folder with the .dmg extension will appear next to the original folder. Double clicking on it will open a window for entering your password. And after entering it, it will mount the folder on the Desktop in the form of an external drive.

After entering the password, the encrypted image is mounted as an external drive
  1. To add new files to an encrypted folder, click on it, enter the password, and then drag the necessary files into it. After that, right-click on the image and then “Extract”.

You can add any files to the encrypted image

The advantage of this method is that encryption occurs through standard macOS functions, so you can open your files on any other computer without any problems.

Please note that the protected folder does not replace the original one. Therefore, do not forget to delete the original and empty the trash. If you use backup services like Time Machine, make sure you delete unencrypted files there too.

2. How to put a password on a flash drive

Sometimes you not only need to encrypt files, but also remove them away from your computer. In this case, it is more convenient to make an encrypted flash drive that will ask you to enter a password every time you connect to your Mac.

For this we also need Disk Utility:

  1. Open Programs ▸ Utilities ▸ Disk Utility;
  2. Select your drive on the right and click Erase;
  3. In chapter Format select APFS (encrypted);
  4. Enter the disk encryption password.

Create an encrypted USB flash drive using macOS Disk Utility
An encrypted flash drive works exactly the same as a regular one, you just need to enter a password every time you connect it to your computer. If you accidentally lose such a flash drive, no one without a password will be able to view the contents.

3. How to put a password on a file or folder using Encrypto

Encrypting files using Encrypto is more convenient than using Disk Utility.

To encrypt a file, you simply drag it onto the Encrypto window and set the desired password. Decryption occurs by double clicking on the file.


Drag information onto the Encrypto window to encrypt it
To decrypt a file, double-click on it and enter the password

The downside of this method is that to decrypt files on another computer you will need to install Encrypto. Fortunately, the application is free, there is a version for macOS and Windows.

The recently released operating system OS X Mountain Lion has slightly improved this feature. Now you can create a new encrypted disk image directly from the desired folder. Although you can also create a blank disk image and then fill it as needed. Disk Utility will help us create such an image.

Note: This feature will only allow you to encrypt and password protect a folder. If you want to encrypt the entire disk, you'd better use the FileVault feature.

Open Disk Utility, which can be found in Programs -> Utilities.

Call the “File” menu and select the “New” option, then “Disk image from folder”.

Specify the folder you want to encrypt and then click “Create Image.” After this, set the image format to “read/write” and the encryption to “128-bit AES”.

Enter a strong password (or generate one for yourself using the black key icon) and - this is important - uncheck the option to remember the password in the keychain. Then click OK.

By the way, if you are not going to use your encrypted image as a working folder to which you will add or delete documents, then you can choose a different image format.

As a result of the steps described above, an encrypted disk image will be created based on the folder you specified. After this, when you try to mount your encrypted dmg file in Finder, you will have to enter the password. Otherwise, you will not have access to the contents of this file.

Just remember to uncheck the option to remember your password. Otherwise, your password will be stored in the system, and everyone who has access to your account will be able to view the contents of the created encrypted image.

It's worth noting that the created encrypted image can be treated like a folder - you can copy, delete or move files from it. And everything you add to it will also be encrypted. When you are finished working with the image, simply unmount it. Accessing it again will require you to enter a password.

A video of creating an encrypted disk image and mounting it can be viewed below:

Hiding secrets.

There are situations when it is necessary to hide some files and folders on the computer from prying eyes, be it correspondence with a former mistress (lover), incriminating evidence, old private photos or simply too frank films. Today we will tell you how you can quickly and easily hide files in OS X. Everything is done in 3 simple steps.

1. First, you'll need Terminal, which you can launch directly from the Spotlight search bar.

2. Then enter the command in Terminal chflags hidden.

3. Next, simply drag the folder or files you want to hide into the running window. After which the path to the selected object will automatically be displayed in the Terminal window. After pressing the Enter button, the folder/file will disappear.

This is the easiest option to hide information from prying eyes. Important: if a person knows the name of the folder and files, he will still be able to use Spotlight to detect the hidden file.

If you want your data to be completely invisible, you need to perform two more steps:

1. Go to System Preferences – Spotlight

2. In the Confidentiality tab, exclude folders with hidden content from the general search (for example, in my case /Users/YuryAndreev/Desktop/)

To return what is hidden, launch the terminal again and enter chflags nohidden ~/path to the hidden folder (or file)/

Everything ingenious is simple. Situations are different, keep your private securely!

website Hiding secrets. There are situations when it is necessary to hide some files and folders on the computer from prying eyes, be it correspondence with a former mistress (lover), incriminating evidence, old private photos or simply too frank films. Today we will tell you how you can quickly and easily hide files in OS X. Everything is done in 3 simple steps. Data can also be stored on...

The need to install protection when turning on your MacBook may arise at any time. Any user may experience situations when this is really needed. Let's look at several installation methods.

Setting a password

Protection is established using standard network resources. First, click on the apple product logo (upper left corner of the screen). Section “System Settings”, and then “System” => “Accounts”. Now, at the bottom of the window that opens, find the lock symbol and click on it. Enter the administrator password and select the desired account to be edited. After that, select “Change password” and enter a new combination (write it down for several sources). Enter the same password again and press the “OK” button. Go to the “Personal” section, and then “Security”. Check the box next to the inscription: “Request a password immediately when exiting sleep or screensaver mode.”

Setting a password for a folder

You can protect a folder to hide important confidential data. You need to go to programs, and then select “Disk Utility”. There we find the “New Image” section, enter the name of the folder in “Save As...” and select the location where it will be stored.

The next step is to specify the size (for example, 2.5 GB) and format (Mac OS Extended (magazine)). “Encryption” - specify 128-bit AES. In the “Partition” item, select the hard drive. The next step is to select “Growing disk image” (in format) and click on “Create”. The last steps repeat the previous description: enter the code in two fields and click on “OK”.

Password reset Resetting a password is most often necessary if the user has forgotten it. However, it takes a long time to take a Mac to consultants at the user support center, and the process itself will not take more than 5 minutes. The first method will help you change protection using Apple ID.

  1. To use this method, you must first select “Allow the user to reset their Apple ID password” in the user settings. If the item has been selected, do the following:
  2. Login to your account;
  3. Near the password field, click on the question mark;
  4. Enter your Apple ID details and reset the protection.

This method may not work the same if you have FileVault enabled. To turn it off, you will need to go to the “Protection and Security Settings” section.

Recovering using the enabled FileVault function involves entering a recovery password. Initially, click the question mark next to the passcode field. At the very bottom of the window, click on the “reset using recovery key” button. Enter the recovery code. Here you will have to recreate different passwords.

If there is no data at hand, and the user has forgotten the access code at the most inopportune moment, the third method should be used. Reboot the Mac by holding down the “Command + R” hotkeys (until the loading indicator appears on your screen). Select the language, select “Utilities” from the menu at the top and “Terminal” from the drop-down menu. Enter the command “resetpassword” and press enter. A window appears, here we select the account volume and the account itself. Here you can set a password by entering it twice, then click “OK”. We reboot the computer, “New keychain” and now you need to install a new code.

Note

This method will work for any Mac operating system, but if you are unable to use it yourself, try finding a recovery password. If attempts are unsuccessful, you should contact consultants or a specialized product store. Try to record your data on several sources, this will make your work easier in the future.

If you want to see on our website answers to your questions about everything related to Apple technology, the Mac OS X operating system (and its launch on a PC), write to us via or.

We received the following question:

Hello) Tell me
please how can I password this or
another folder, i.e. to view
content, you would need to enter a password.
Thank you.

For the average user who does not want to understand the intricacies of assigning rights and owners to folders, the simplest solution would be to create encrypted disk image. In essence, this is the same folder: by double-clicking you see the contents, you can copy new files there and delete old ones. But every time you open such a folder, you will need to enter a password, which is extremely difficult to crack.

To create such an encrypted container, run Disk Utility from the folder Programs/Utilities . Click the button "New Image":

In the dialog box that opens, set the parameters as shown in the screenshot below. You shouldn't be confused by the 2.5 GB size. The created image for storing files will be almost zero in size, and 2.5 GB will be its maximum possible size. Of course, this size (as well as the name of the image and its location) is entirely up to you.

Where do you enter the password to access the contents of the container? In the next step, which starts after pressing the button "Create":

What happens next? It will appear in the folder you specified file with extension .sparseimage- this is your encrypted folder. When double-clicked, it requires a password, and then mounts for reading and writing as a separate drive.



 

It might be useful to read: