Difference between revisions of "Ubuntu 22.04 Specific folder Encryption"
From Notes_Wiki
(Created page with "Home > Ubuntu > Ubuntu 22.04 > Ubuntu 22.04 Specific folder Encryption") |
|||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu 22.04]] > [[Ubuntu 22.04 Specific folder Encryption]] | [[Main Page|Home]] > [[Ubuntu]] > [[Ubuntu 22.04]] > [[Ubuntu 22.04 Specific folder Encryption]] | ||
We can encrypt a particular folder (not the entire drive) on Ubuntu 22.04 using '''eCryptfs'''. This method allows you to mount a directory as an encrypted filesystem, so only users with the correct passphrase can access the data. Here's a step-by-step guide: | |||
== Install eCryptfs Utilities == | |||
<pre> | |||
apt install ecryptfs-utils | |||
</pre> | |||
== Prepare the Directory == | |||
Create a new, empty directory that you want to encrypt. Do not encrypt a directory that already contains data, as existing data will not be encrypted or may become inaccessible. Move any existing data out first. | |||
<pre> | |||
mkdir ~/myencryptedfolder | |||
</pre> | |||
== Mount the Directory as Encrypted == | |||
Mount the directory to itself with eCryptfs: | |||
<pre> | |||
#sudo mount -t ecryptfs ~/myencryptedfolder ~/myencryptedfolder | |||
</pre> |
Revision as of 09:47, 31 May 2025
Home > Ubuntu > Ubuntu 22.04 > Ubuntu 22.04 Specific folder Encryption
We can encrypt a particular folder (not the entire drive) on Ubuntu 22.04 using eCryptfs. This method allows you to mount a directory as an encrypted filesystem, so only users with the correct passphrase can access the data. Here's a step-by-step guide:
Install eCryptfs Utilities
apt install ecryptfs-utils
Prepare the Directory
Create a new, empty directory that you want to encrypt. Do not encrypt a directory that already contains data, as existing data will not be encrypted or may become inaccessible. Move any existing data out first.
mkdir ~/myencryptedfolder
Mount the Directory as Encrypted
Mount the directory to itself with eCryptfs:
#sudo mount -t ecryptfs ~/myencryptedfolder ~/myencryptedfolder