Recent Changes - Search:

Public

Physics

Engineering

Literature
Journal Club
People

MineralPET
DAQ

Computing

Africa


FSCrypt

FSCrypt enables users to encrypt directories within a filesystem. The /mnt/scratch filesystem can be encrypted on our workstations (Didingwe, Odin, Ukhozi, etc). As an example of setting up:

    > mkdir /mnt/scratch/brooks/example
    > fscrypt encrypt /mnt/scratch/brooks/example
    The following protector sources are available:
    1 - Your login passphrase (pam_passphrase)
    2 - A custom passphrase (custom_passphrase)
    3 - A raw 256-bit key (raw_key)
    Enter the source number for the new protector [2 - custom_passphrase]: 
    Enter a name for the new protector: passphrase
    Enter custom passphrase for protector "passphrase": 
    Confirm passphrase: 
    "/mnt/scratch/brooks/example" is now encrypted, unlocked, and ready for use.

After that you can lock and unlock that folder:

    > fscrypt lock /mnt/scratch/brooks/example
    "/mnt/scratch/brooks/example" is now locked.
    > fscrypt unlock /mnt/scratch/brooks/example
    Enter custom passphrase for protector "passphrase": 
    "/mnt/scratch/brooks/example" is now unlocked and ready for use.

While locked, no-one will be able to view the contents or names of files in the encrypted directory. When unlocked - normal file permissions apply. Admin users will be able to see while unlocked. After a shutdown the key will be forgotten and data will be fully encrypted.

Admin

Note that the pam_passphrase has not been configured yet. Filesystem wide config is in .fscrypt at the root of the filesystem.

To set up, first there needs to be a system-wide setup with fscrypt setup. That will automatically configure the root file system but you can remove /.fscrypt. Then the intended filesystem can be set up with fscrypt setup /mnt/scratch. Make sure to enable all users to do encryption.

Edit - History - Print - Recent Changes - Search
Page last modified on November 19, 2026, at 09:31 am