0

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.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Egon
  • 15
  • 3
  • I guess you either mean version 12.04 or version 12.10 of Ubuntu. There is no 12.01 I know of. Ubuntu versions are issued twice a year, once in April and once in October, hence the .04 and .10 (so they are not really numbers but dates). – Alfe Dec 11 '13 at 13:55
  • @Alfe Sorry, typo. It's version 12.04. I'll correct my post. – Egon Dec 11 '13 at 17:37

1 Answers1

1

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.

Alfe
  • 56,346
  • 20
  • 107
  • 159
  • Yes, I just checked and you're right. `ecryptfs` is the mount type. So will I not be able to get screen to work with the encrypted home directory? If not, I guess I'll look into how to remove the encryption. – Egon Dec 11 '13 at 17:35
  • I guess that you need to have a login shell running to prevent that unmount. But that also means a significant decrease of security. – Alfe Dec 11 '13 at 18:58