Protect your data with EncFS


Some time ago I showed them how to protect our folders and its content using Cryptkeeper, an application that we can find in the repositories of our favorite distributions.

In the case of Arch Linux, Cryptkeeper is in AUR, and although I can install it I did not feel like adding Yogurt or use makepkg. So I thought: Cryptkeeper it must be a front end of another application. And indeed, Cryptkeeper is an improved front for EncFS (I eat well said at the time the user mxs).

Why improved? Because Cryptkeeper shows / hides the folder where we save our content, which EncFS does not make. But we can do it very easily.

Using EncFS

For this example I am assuming that we already have an encrypted folder. It will usually have a period in front of the name, for example .Private.

Now let's say I want to access the .Private folder. The first thing is to install EncFS.

$ sudo pacman -S encfs

If we want to mount the encrypted folder with our user (and not using sudo), we have to install the package fuse and in the case of Debian, add our user to that group:

$ sudo pacman -S fuse

Curiously with Arch Linux I didn't have to add my user to the group fuseIn fact, there is no such group. o_O

Now, to show the .Private folder, we have to create an empty folder to "mount" .Private in it. Let's say we have the Private folder (without the dot in front). So we execute:

$ encfs /home/usuario/.Privado/ /home/usuario/Privado/

Then, to disassemble it, we just have to put:

$ fusermount -u /home/usuario/Privado/

And that's it. But since we are intelligent users, we will create 2 alias in the file .bashrc which will create the folder for us, execute encfs and subsequently Dolphin, Nautilus or our preferred file manager.

alias activar='mkdir /home/usuario/Privado && encfs /home/usuario/.Privado /home/usuario/Privado && dolphin'

and to remove it:

alias desactivar='fusermount -u /home/usuario/Privado/ && rm -R /home/usuario/Privado'

As you can see I used the aliases activar y deactivate but you use whatever you want ..

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

8 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Alexander Mayor said

    Very good, I recently wrote about how to encrypt files with openssl, especially for backups: I will leave it here in case it is useful to someone: how to encrypt files with openssl

  2.   Manuel de la Fuente said

    I had already commented on it before, but I use it for the same eCryptfs. It is already integrated with the Linux kernel, so it is only a matter of installing the userspace tools from the repositories (# pacman -S ecryptfs-utils) and ready. In everything else it works the same as EncFs. You can even synchronize the encrypted folders with Dropbox and every time you modify something only the modified file is synchronized and not the entire folder as in other alternatives. And after months of constant updates (I am going for the year using it, if I did not comply already) it has never given me the slightest problem. A marvel.

    1.    Anonymous said


      Thanks for your contribution. I was testing this cipher, using the Arch page you link to. At the end of this page there is a reference to a program: ecryptfs-simple. I was looking at the page of this program and at the beginning the author placed this text:


      I have lost data with eCryptFS and can no longer recommend it. As far as I can tell, this is not due to ecryptfs-simple. All of the encryption and decryption is handled by eCryptFS, and data loss due to resulting input / output errors eith eCryptFS alone abound online.

      This may be due to some common user error, but it is nevertheless too great a risk for important data. I have switched back to using EncFS for my data. "

      At the end it says it goes back to EncFS.

      Well, in view of this I abandon ecryptfs and continue using EncFS.


  3.   Fabian said

    I think the title does not match the content of the entry: «Protect your data with encfs» and below the only thing that is explained is how to show a previously encrypted folder ... Only as a constructive criticism from a loyal reader.

    1.    Daniel said


  4.   Angel_Le_Blanc said

    I used that one, but I put a 50 character password of this type:% $ H = 2ls1Ñ34日本 @ ~… ..
    , I mistakenly deleted my keyring and I no longer have access to those files.

    1.    sanhuesoft said

      Wow, a pity ... That is the problem with putting such complex passwords, that suddenly we forget (or in this case the keyring is deleted) and forget about the files.

  5.   Blitzkrieg said

    I used it a while ago but I was disappointed