Does the owner of an encrypted directory need to be logged for it to be accessible by the system?If the user's directory is encrypted, ie other directories besides the home directory, does it mean that no process on the system, including those running as root will be able to access it?Does the user have to be logged in physically on the  computer for the files to be available? For instance, I assume that the user cannot log in via SSH using key authentication if the authorized_keys file which would be in the ~/.ssh directory, but have to login at the terminal  for via a remote spice connection for access to the directory to be enabled,   before logging in via SSH if that is needed.If the user has a database or web application stored in the encrypted directory I  would expect it not to be able to start until physical login.Is that right because that is what I need. If there any services running in the encrypted directory, would the system know to shut them down if the user logged out?
Does the owner of an encrypted directory need to be logged for it to be accessible by the system?
disk encryption
Yes, if you use a system that encrypts your user(s) home directory(s) individually.  The only implementation that makes sense is to mount the encrypted directory at login time.  For example, you can find this system offered in the Ubuntu installer using ecryptfs.  (ecryptfs is also built in as part of Chrome OS).  This is a different approach from Full Disk Encryption, where the whole filesystem is unlocked with a password at the start of the boot process.  All your desires follow naturally from ecryptfs or any equivalent system... except for the last oneIf there any services running in the encrypted directory, would the system know to shut them down if the user logged out?Good question :).  Unfortunately unmounting appears to be more error-prone.  (I've also seen bugs in stopping processes/services, which is indeed a pre-condition for unmounting.  I'm not clear whether ecryptfs has any extra support to kill processes).https://www.google.co.uk/search?q=ecryptfs%20logout%20unmount%20OR%20umountSince this question left this for the last sentence, & is also impossibly unspecific, you might want to ask a separate question.  E.g. does this work on X version Y.  Please show how you know it works, then I will be able to verify it on my own system.It would also be nice if you could outline reasons you're interested in logout at all.  It suggests a multi-user system.  This is not very common, so if you can be more specific that would probably be useful.