Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to ecryptfs and I need some clarification on how it works.
Suppose there are two root users userA and userB, If I mount some folder under userA:
[userA@Dev] $ mount ecryptfs real img
now I can visit the img folder to access decrypted data.

My questions is:
While userA is still in log in state. Can userB login and access the decrypted data? This is currently what I observed on my local machine, but I'm not sure if it was cause by my misconfiguration. If it is the case, how can I avoid other users from accessing the decrypted data while userA is in login state?

share|improve this question

Yes its possible to access other users decrypted data, since eCryptFS does not distincts who is accessing a file. eCryptFS only manages the encryption/decryption of the files on the disk. As soon as it is mounted, any permitted user can read/write encrypted files transparently.

However, Linux has other technics to define access to a file or directory: E.g. the POSIX file permissions. So its highly recommended to simply restrict access to a private directory to only the user who has the key to it...

chown -R user ~/Private
chmod -R 700 ~/Private

There is also a FAQ entry:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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