ecryptfs mount in container

proximity

Well-Known Member
Jul 19, 2019
50
1
48
51
How can I get ecryptfs to work in a container?

I currently am trying these options:
unprivileged: 1
features: keyctl=1,mount=ecryptfs;,nesting=1,fuse=1,mknod=1

But I get this output:
# mount -t ecryptfs -o "key=passphrase:passphrase_passwd=9ertLfg6v,ecryptfs_passthrough=no,ecryptfs_cipher=aes,ecryptfs_key_bytes=32,ecryptfs_unlink_sigs,ecryptfs_e
nable_filename_crypto=y,ecryptfs_fnek_sig=ca1ebb4af086a125,verbosity=1,no_sig_cache" /home/user/secure/ /home/user/secure/
Exiting. Unable to obtain passwd info

Any suggestion?
 
hi,

try with a privileged container and it should work.

but why do you want ecryptfs? you can have native encryption with ZFS and store your container there (with better performance too)
 
Privileged seems to work, thank you. Not possible with unprivileged?

I want it to work independent on the system on which it runs (proxmox container or bare metal) and I only want to encrypt a few config files.