Error mounting eCryptfs: [-13] Permission denied - Amazon Linux AMI

808 Views Asked by At

I am trying to encrypt a directory somewhere in /home/balab/payload/bala/encrypt_data

cd /home/balab/payload/bala

from here i hit following command to encrypt

sudo mount -t ecryptfs ./encrypt_data ./encrypt_data

At the end I get

"Error mounting eCryptfs: [-13] Permission denied"

$sudo mount -t ecryptfs ./encrypt_data ./encrypt_data
Select key type to use for newly created files:
 1) openssl
 2) passphrase
Selection: 2
Passphrase:
Select cipher:
 1) aes: blocksize = 16; min keysize = 16; max keysize = 32 (loaded)
 2) des3_ede: blocksize = 8; min keysize = 24; max keysize = 24 (not loaded)
Selection [aes]: aes
Select key bytes:
 1) 16
 2) 32
 3) 24
Selection [16]: 16
Enable plaintext passthrough (y/n) [n]: n
Enable filename encryption (y/n) [n]: n
Attempting to mount with the following options:
  ecryptfs_unlink_sigs
  ecryptfs_key_bytes=16
  ecryptfs_cipher=aes
  ecryptfs_sig=2f14d8d2187bd785
WARNING: Based on the contents of [/root/.ecryptfs/sig-cache.txt],
it looks like you have never mounted with this key
before. This could mean that you have typed your
passphrase wrong.

Would you like to proceed with the mount (yes/no)? : yes
Would you like to append sig [2f14d8d2187bd785] to
[/root/.ecryptfs/sig-cache.txt]
in order to avoid this warning in the future (yes/no)? : yes
Successfully appended new sig to user sig cache file
Error mounting eCryptfs: [-13] Permission denied
Check your system logs; visit <http://launchpad.net/ecryptfs>

1

There are 1 best solutions below

0
On

I had the same error, but using non-full path works for me. So try to use

sudo mount -t ecryptfs encrypt_data encrypt_data

instead of

sudo mount -t ecryptfs ./encrypt_data ./encrypt_data