Constantin Orasan's page

All kind of random stuff on NLP, AI, photography and who knows

3-Minute Read

Yesterday, I finally found the time to upgrade my Ubuntu machine to the latest version. It wasn’t necessary, but I like to try the latest version on my home computer. The installation went smoothly, but I was surprised to see at the end of the installation process that encfs needed to be removed. I wasn’t too worried about this because, in the past, installers had removed packages at the end of the upgrade process, and I had always been able to reinstall the packages I needed. However, this time I discovered, to my surprise, that encfs had been deprecated and removed from repositories.

I am aware of the limitations of encfs, so I don’t rely on it encrypt data. However, I still have a few folders that were encrypted with it in the past and have not been migrated to another form of encryption. After some investigation, I realised that encfs is not available through a PPA, but that its author had ported it to Rust. The code is available on Github, and here I explain how to install it.

Installing Rust and cargo

In order to install the program you need cargo, the package manager for Rust. Ubuntu has several options to install it.

sudo snap install rustup  # version 1.29.2, or
sudo apt  install cargo   # version 1.93.1ubuntu1
sudo apt  install rustup  # version 1.27.1-8

Because I was not sure whether I wanted to keep Rust on my computer, I decided to install rustup from the Snap Store. Removing it at a later stage might be easier.

The next step was to install the actual cargo command itself by running rustup default stable. This downloaded its latest stable version and installed several dependencies.

Installing encfs

The next step was to download the latest version of encfs from github using git clone https://github.com/vgough/encfs.git. You can also download it as a zip file, if you prefer.

To compile the program, I followed the instructions in INSTALL.md and ran cargo build --release. In order for this process to succeed, you will need to make sure you have all the required dependencies. For example, in my case the compilation stopped with an error because I didn’t have the development version of the fuse3 library installed.

  thread 'main' (188383) panicked at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/typed-fuse-0.9.0/build.rs:24:10:
  fuse3 pkg-config module not found: 
  pkg-config exited with status code 1
  > PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags fuse3

  pkg-config output:
    Package fuse3 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `fuse3.pc'
    to the PKG_CONFIG_PATH environment variable
    Package 'fuse3' not found

  The system library `fuse3` required by crate `typed-fuse` was not found.
  The file `fuse3.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
  The PKG_CONFIG_PATH environment variable is not set.

  HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `fuse3.pc`.

  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

This was an easy error to fix and entailed installing the libfuse3-dev package. Once I had installed this package, the compilation completed successfully. For other similar errors, you will need to make sure that the -dev version of the relevant library is also installed.

The files are installed by running cargo install --path . and you can access them at /home/user/.cargo/bin/encfs

I tried this version of encfs and was able to access my old data without any problems. I have not tested the program extensively, but I am pleased to say that I have not experienced any difficulties so far. To be on the safe side, I will probably switch to gocryptfs, which is the recommended successor to encfs. I may write about it at some point.

Recent Posts

Categories