Question

I recently installed Ubuntu 12.04 sever on a new box. I ssh in, run a command (a do loop iterating over a perl script that forks off several processes each running an application [blastn] on the provided data), and detach using Ctrl-a d. When I run screen -r to resume, no problem, the loop is running happily. When I log out of my ssh session and log back on, I can still resume the screen session with screen -r, but now the loop has terminated with error messages stating that the application can't be found and/or the perl script can't be found. I've tried giving the full path to the perl script to my perl command (i.e. not using tilde), but no dice. Still gets lost after ssh logout / logon.

It seems this is particular to my Ubuntu server. Running the exact same loop / perl script forking off processes / applications through ssh into my Mac OS X box, it finishes happily even after logging out from ssh, so I wonder if this has something more to do with my Ubuntu server than GNU screen. Much searching online has yielded no answer, however, so I would appreciate any help that you may be able to offer.

Was it helpful?

Solution

I can only guess you may have an encrypted home directory which as decrypted version is mounted during your login time. As soon as the last login terminates, the decrypted version gets unmounted and your running processes have no access anymore to the files in your home directory.

You can check this by typing mount | grep ^/home/. If this shows ecryptfs as type of the mount, then this is the case.

If this shows nothing (or a file system type like ext3 or similar), then my guess is wrong.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top