File System Encryption on CentOS 6 | Linux Today

File System Encryption on CentOS 6

Written By
Web Webster
Web Webster
Jan 11, 2012

“CentOS 6 now provides eCryptfs which provides the ability to
encrypt data and files on a per-file basis instead of the entire
disk as in block encryption. The eCryptfs system sits on top of the
current file system to provide the encryption layer, that is why it
is known as the pseudo-file system. The file operations which are
sent to the underlying file system are intercepted by eCryptfs and
encrypted.

“This package needs to be installed in order to perform the
encryption.

“yum install -y ecryptfs-utils

“Here is the process of mounting a new partition called /data
once it has been created and formatted for ext4. The partition that
was created with ext4 in the example is /dev/sdc1 and then it is
mounted as /data.

“mkdir /data

“mount /dev/sdc1 /data

“In order to limit confusion, mount the directory with ecCyptfs
using the underlying partition name. In this case, the directory is
/data so it is mounted as data. Remember, eCryptfs is layer which
is on top of the existing file system. When you mount the directory
you will need to provide several options like passphrase, cipher
and key bytes.”


Complete Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.