0
$ ecryptfs-setup-private --force
Enter your login passphrase:
Enter your mount passphrase [leave blank to generate one]:

************************************************************************
YOU SHOULD RECORD YOUR MOUNT PASSPHRASE AND STORE IT IN A SAFE LOCATION.
  ecryptfs-unwrap-passphrase ~/.ecryptfs/wrapped-passphrase
THIS WILL BE REQUIRED IF YOU NEED TO RECOVER YOUR DATA AT A LATER TIME.
************************************************************************

Done configuring.

Testing mount/write/umount/read...
Inserted auth tok with sig [a27907c11868ebc7] into the user session keyring
Inserted auth tok with sig [5ca19d6c4edfa12f] into the user session keyring
mount: No such file or directory
ERROR:  Could not mount private ecryptfs directory

Any idea how to solve this? Checking ecryptfs-setup-private source code, this is where it's failing:

/sbin/mount.ecryptfs_private || error "$(gettext 'Could not mount private ecryptfs directory')"

The file exists:

# which mount.ecryptfs_private
/sbin/mount.ecryptfs_private
0

For some reason the mount.ecryptfs_private call is failing, so it's not able to mount the eCryptfs folders it tried to set up.

I'm not sure why, but checking man mount.ecryptfs_private it reveals some info like:

   mount.ecryptfs_private is a mount helper  utility  for  non-root  users  to
   cryptographically mount a private directory, ~/Private by default.

   This  program  optionally  takes one argument, ALIAS.  If ALIAS is omitted,
   the program will default to using "Private" using:
    - $HOME/.Private as the SOURCE
    - $HOME/Private as the DESTINATION
    - $HOME/.ecryptfs/Private.sig for the key signatures.

   If ALIAS is specified, then the program will look  for  an  fstab(5)  style
   configuration in:
    - $HOME/.ecryptfs/ALIAS.conf and for key signature(s) in:
    - $HOME/.ecryptfs/ALIAS.sig

   The mounting will proceed if, and only if:
     - the required passphrase is in their kernel keyring, and
     - the current user owns both the SOURCE and DESTINATION mount points
     - the DESTINATION is not already mounted

   This program will:
     - mount SOURCE onto DESTINATION
     - as an ecryptfs filesystem
     - using the AES cipher
     - with a key length of 16 bytes
     - using the passphrase whose signature is in ~/.ecryptfs/Private.sig

So check for something missing or wrong, look for files like:

  • $HOME/.Private as the SOURCE
  • $HOME/Private as the DESTINATION
  • $HOME/.ecryptfs/Private.sig for the key signatures.
  • $HOME/.ecryptfs/ALIAS.conf and for key signature(s) in:
  • $HOME/.ecryptfs/ALIAS.sig

And if your "user owns both the SOURCE and DESTINATION mount points" and if "the DESTINATION is not already mounted".

If everything looks good, try running mount.ecryptfs_private yourself and see what it tells you, the ecryptfs-setup-private program could be hiding potentially useful stdout / stderr info.

Or, ecryptfs-add-passphrase may be failing somehow.

And just for another check, did you install eCryptfs using CentOS's default package management system? Didn't download random files from the net or a really old/new (possibly incompatible) version or anything?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.