Occasionally, when I log into my Ubuntu server, the prompt says jon@jon-server:(unreachable)/$. Running pwd at this point returns (unreachable)/, however echo $HOME returns /home/jon as expected. If I cd then I get taken to my actual home folder.

What could be the reasons for this? It doesn't seem to cause any problems, apart from public key authentication with SSH (presumably if it can't see the home folder then it can't get to the .ssh folder inside it). It seems to be consistent until restart - that is, every new shell will do this, until I restart, when it will either work normally or not.

This has been happening for at least the last few release upgrades, so not related to Oneiric. I selected the installer option to encrypt my home folder.


The question and answer for Is it possible to use the 'screen' command to work with files on an encrypted home directory? helped me understand why this might be happening: being logged in via screen with ssh doesn't tell Ubuntu that you're still using the system and so after a while (overnight in my case) the encrypted home directory gets unmounted, so Vim can't save files it had open in screens, and the working directory on the command prompt becomes (unreachable).

I know that the problem goes away if I have an NX session logged in. NX might be described as screen for GUI; I just start an NX session and disconnect it (letting it run the background), and can continue using ssh/screen indefinitely. Not elegant or ideal but I use NX occasionally so it worked for me.

The linked question also suggests deleting the empty file in /home/.ecryptfs/$USER/.ecryptfs/auto-umount. This might help if you don't use NX.


I have had the same problem having (unreachable) folder found in my remote Ubuntu machine with personal encrypted home folder.

The problem involve also any program that is running on the background (in my case were several MATLAB instances which required to save workspaces).

I permanently solved the problem by deleting

/home/.ecryptfs/$USER/.ecryptfs/auto-umount

as suggested by Ahmed Fasih and reported in Is it possible to use the 'screen' command to work with files on an encrypted home directory?.

I suggest to set this problem as solved and be a reference for other users since there are not any other answers/topics on this matter (and required me a lot of searching to understand this issue).


"I selected the installer option to encrypt my home folder."

I'd say that may be your answer, I may have this slightly incorrect as I don't use ecryptFS on any machines that I'm not using logged in a normal environment. But I think it may have something to do with your home directory being encrypted, thus its contents aren't available, unless you're either logged in physically on the machine's console, or you've specifically mounted/decrypted the home directory contents.

If you go to /home/jon is all your content there, or a README.txt and small .desktop link to help you start the decryption/mounting process?