LinuxCommandLibrary

umount.ecryptfs

Unmount eCryptfs filesystem

SYNOPSIS

umount.ecryptfs

PARAMETERS


    The path to the directory where the eCryptfs filesystem is currently mounted. This is the primary argument passed to the helper script.

DESCRIPTION

The umount.ecryptfs command is a specialized helper script designed to correctly unmount filesystems encrypted with eCryptfs. It is typically invoked by the main umount(8) command when it detects that the filesystem being unmounted is an eCryptfs type.

eCryptfs is a stacked cryptographic filesystem that encrypts files at the filesystem level, providing file-level encryption. When an eCryptfs filesystem is mounted, a kernel module manages the encryption and decryption processes transparently. Unmounting such a filesystem requires specific steps to ensure all buffers are flushed, encryption keys are properly cleared from memory, and the underlying storage is safely disengaged.

umount.ecryptfs handles these intricacies, ensuring that the unmount operation is performed cleanly, minimizing the risk of data corruption or exposing sensitive data.

CAVEATS

  • Root Privileges: Like umount(8), umount.ecryptfs requires root privileges to execute successfully.
  • Active Processes: The unmount operation will fail if there are any open files or active processes within the eCryptfs mountpoint. It is crucial to terminate all processes accessing the filesystem before attempting to unmount.
  • Kernel Module: Relies on the eCryptfs kernel module being loaded and functional.
  • Data Loss Risk: Improper termination of the system or failure to unmount cleanly can lead to data corruption within the eCryptfs filesystem.

HELPER SCRIPT MECHANISM

umount.ecryptfs is an fshelper program. This means that when the main umount(8) command is executed for an eCryptfs filesystem, it looks for and executes /sbin/umount.ecryptfs (or a similar path) to delegate the filesystem-specific unmounting tasks. This design allows umount(8) to support various filesystem types without needing to hardcode their specific unmounting logic.

HISTORY

eCryptfs was initially developed by IBM and later integrated into the Linux kernel, becoming a standard feature for filesystem-level encryption. The umount.ecryptfs script is part of the ecryptfs-utils package, which provides a set of user-space tools for managing eCryptfs filesystems. Its development aligns with the need for robust and secure handling of encrypted data within the Linux ecosystem, ensuring proper unmounting procedures specific to the stacked filesystem architecture of eCryptfs.

SEE ALSO

umount(8), mount.ecryptfs(8), ecryptfs(7), ecryptfs-utils(7), cryptsetup(8)

Copied to clipboard