I wanted to encrypt a directory in such a way that the directory will stay encrypted after I login and only when I deliberately enter my passphase will the content of the directory be decrypted. I did the following
mkdir ./secret chmod 700 secret sudo mount -t ecryptfs ./secret ./secret
Answered all the questions with sensible answers and check with
>mount |grep secret /home/myname/mydir/secret on /home/myname/mydir/secret type ecryptfs (rw,relatime,ecryptfs_fnek_sig=xxxxxx,ecryptfs_sig=yyyyyy,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs)
and then placed some files into ./secret , checked the files are accessible (which is suppose to be). Then I unmount the directory so that it stays encrypted.
sudo umount ./secret
Checked again now all the files are encrypted (also filenames). Then I want to access the files I tried to mount it back using the following line
sudo mount ./secret ./secret -o key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_passthrough=no,ecryptfs_enable_filename_crypto=yes
But I got a
mount: /home/myname/mydir/secret: /home/myname/mydir/secret is not a block device.
Did I missing something when first setup the mount point?