Dong Nguyen
gocryptfs

Install

sudo dnf install gocryptfs

# or
sudo apt install gocryptfs
sudo pacman -Sy gocryptfs

Usage

# create encrypted dir
gocryptfs -init CRYPTED_DIR
# it will require password and print master key once

# mount to normal dir
gocryptfs CRYPTED_DIR NORMAL_DIR
# it will generate `gocryptfs.conf` file, can be moved to another secure place
# every file/folder in NORMAL_DIR will be encrypted within CRYPTED_DIR

# unmount to stop mirroring
fusermount -u NORMAL_DIR
# now NORMAL_DIR should be empty

# remount
gocryptfs CRYPTED_DIR NORMAL_DIR

# remount with config file
gocryptfs CRYPTED_DIR -config /path/to/gocryptfs.conf NORMAL_DIR

# remount with masterkey file
gocryptfs CRYPTED_DIR -masterkey string NORMAL_DIR

# change password
gocryptfs -passwd [OPTIONS] CRYPTED_DIR

# auto mount with fstab
/tmp/CRYPTED_DIR /tmp/NORMAL_DIR fuse./usr/local/bin/gocryptfs nofail,passfile=/tmp/password 0 0

# Check consistency
gocryptfs -fsck [OPTIONS] CRYPTED_DIR

# Show filesystem information
gocryptfs -info [OPTIONS] CRYPTED_DIR