Skip to content

Getting "encryption not enabled" on an ext4 filesystem #436

@alexandracristea09

Description

@alexandracristea09

I keep getting this error when trying to encrypt a directory:

"fscrypt encrypt /var/opencloud/test_fscrypt/
[ERROR] fscrypt encrypt: encryption not enabled on filesystem /var/opencloud (/dev/sdc1).
To enable encryption support on this filesystem, run:
     sudo tune2fs -O encrypt "/dev/sdc1"
Also ensure that your kernel has CONFIG_FS_ENCRYPTION=y. See the documentation for more details."

The kernel configuration contains the encryption enablement:

grep FS_ENCRYPTION /boot/config-$(uname -r)
CONFIG_FS_ENCRYPTION=y
CONFIG_FS_ENCRYPTION_ALGS=m

Also the 'encrypt' feature flag appears:

sudo tune2fs -l /dev/sdc1 | grep 'Filesystem features'
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg encrypt sparse_super large_file huge_file dir_nlink extra_isize metadata_csum

I've tried unmounting and remounting the filesystem, rebooting, running 'tune2fs -O encrypt /dev/device', but nothing seems to work.
I mention that the machine is running on Linux 9.7, kernel version is 5.14.0-570.37.1.el9_6.x86_64.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions