I am ssh-ing into a Linux cluster that uses an AFS home directory. I am trying to use GNU screen to run a long-running program in a detached screen. If I remain logged in the program executes perfectly, and this includes writing to a file.
I want to be able to logout from the ssh session and leave the program running in the detached screen. I try logging out and ssh-ing back in. However, when I check on the detached screen I see that my program has crashed because it did not have permissions to write to file.
[local]me: ssh firstname.lastname@example.org [remote]user: screen # this pops up a new screen [remote]user: python get_data.py
I then hit Ctrl-a d (to detach screen)
[remote]user: logout [local]me: ssh email@example.com [local]me: screen
And this is what I see in the detached screen:
Traceback (most recent call last): File "get_data.py", line 430, in <module> File "get_data.py", line 346, in produce_roof_patches File "get_data.py", line 225, in save_patch IOError: [Errno 13] Permission denied: '../data/training/labels.csv'
If I do not log out and simply detach (Ctrl-a d) and reattach via 'screen' then the program continues running without any trouble.
I have read that this is because when logging out my filesystem becomes unmounted and the program does not have permissions to write anywhere in my filesystem. Is there a workaround for this?