Why do I get permission denied error when I log out of the SSH session?












5














I have to run some tests on a server at the University. I have ssh access to the server from the desktop in my office. I want to launch a python script on the server that will run several tests during the weekend.



The desktop in the office will go on standby during the weekend and as such it is essential that the process continues to run on the server even when the SSH session gets terminated.



I know about nohup and screen and tmux, as described in questions like:




  • How to keep processes running after ending ssh session?

  • How can I close a terminal without killing the command running in it?


What am I doing right now is:




  • ssh username@server

  • tmux


  • python3 run_my_tests.py -> this script does a bunch of subprocess.check_output of an other script which itself launches some Java processes.

  • Tests run fine.

  • I use Ctrl+B, D and I detach the session.

  • When doing tmux attach I reobtain the tmux session which is still running fine, no errors whatsoever. I kept checking this for minutes and the tests run fine.

  • I close the ssh session


After this if I log in to the server via SSH, I do am able to reattach to the running tmux session, however what I see is something like:



Traceback (most recent call last):
File "run_my_examples.py", line 70, in <module>
File "run_my_examples.py", line 62, in run_cmd_aggr
File "run_my_examples.py", line 41, in run_cmd
File "/usr/lib64/python3.4/subprocess.py", line 537, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib64/python3.4/subprocess.py", line 858, in __init__
restore_signals, start_new_session)
File "/usr/lib64/python3.4/subprocess.py", line 1456, in _execute_child
raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied


I.e. the process that was spawning my running tests, right after the end of the SSH session, was completely unable to spawn other subprocesses. I have chmoded the permissions of all files involved and nothing changes.



I believe the servers use Kerberos for login/permissions, the server is Scientific Linux 7.2.



Could it be possible that the permissions of spawning new processes get removed when I log off from the ssh sessions? Is there something I can do about it? I have to launch several tests, with no idea how much time or space they will take...






  • The version of systemd is 219

  • The file system is AFS, using fs listacl <name> I can confirm that I do have permissions over the directories/files that are used by the script.










share|improve this question
























  • Are you using systemd 230 or more recent? Possibly related to bugs.debian.org/cgi-bin/bugreport.cgi?bug=825394
    – user4556274
    Aug 5 '16 at 14:07










  • @user4556274 Trying systemd-run --version tells me the server is using systemd 219.
    – Bakuriu
    Aug 5 '16 at 14:11










  • @user4556274 In any case I can confirm that the problem is not that the processes are killed, in fact they do keep running, but that they behave differently. As I said I have a script that contains a simple while True: loop and that script runs fine, is not killed and I'm able to resume it without problems. I have also tried to add some subprocess and multiprocessing calls and they work fine. I'm at a loss of what is happening.
    – Bakuriu
    Aug 5 '16 at 14:14










  • Does the python script reside on an AFS or NFS filesystem?
    – Mark Plotnick
    Aug 5 '16 at 15:32






  • 1




    An explanation of what's going on is stackoverflow.com/questions/23571012/… . I don't have experience with AFS, but some pointers on how to extend access to the Kerberos tickets and AFS are given in that question's answers.
    – Mark Plotnick
    Aug 5 '16 at 15:44


















5














I have to run some tests on a server at the University. I have ssh access to the server from the desktop in my office. I want to launch a python script on the server that will run several tests during the weekend.



The desktop in the office will go on standby during the weekend and as such it is essential that the process continues to run on the server even when the SSH session gets terminated.



I know about nohup and screen and tmux, as described in questions like:




  • How to keep processes running after ending ssh session?

  • How can I close a terminal without killing the command running in it?


What am I doing right now is:




  • ssh username@server

  • tmux


  • python3 run_my_tests.py -> this script does a bunch of subprocess.check_output of an other script which itself launches some Java processes.

  • Tests run fine.

  • I use Ctrl+B, D and I detach the session.

  • When doing tmux attach I reobtain the tmux session which is still running fine, no errors whatsoever. I kept checking this for minutes and the tests run fine.

  • I close the ssh session


After this if I log in to the server via SSH, I do am able to reattach to the running tmux session, however what I see is something like:



Traceback (most recent call last):
File "run_my_examples.py", line 70, in <module>
File "run_my_examples.py", line 62, in run_cmd_aggr
File "run_my_examples.py", line 41, in run_cmd
File "/usr/lib64/python3.4/subprocess.py", line 537, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib64/python3.4/subprocess.py", line 858, in __init__
restore_signals, start_new_session)
File "/usr/lib64/python3.4/subprocess.py", line 1456, in _execute_child
raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied


I.e. the process that was spawning my running tests, right after the end of the SSH session, was completely unable to spawn other subprocesses. I have chmoded the permissions of all files involved and nothing changes.



I believe the servers use Kerberos for login/permissions, the server is Scientific Linux 7.2.



Could it be possible that the permissions of spawning new processes get removed when I log off from the ssh sessions? Is there something I can do about it? I have to launch several tests, with no idea how much time or space they will take...






  • The version of systemd is 219

  • The file system is AFS, using fs listacl <name> I can confirm that I do have permissions over the directories/files that are used by the script.










share|improve this question
























  • Are you using systemd 230 or more recent? Possibly related to bugs.debian.org/cgi-bin/bugreport.cgi?bug=825394
    – user4556274
    Aug 5 '16 at 14:07










  • @user4556274 Trying systemd-run --version tells me the server is using systemd 219.
    – Bakuriu
    Aug 5 '16 at 14:11










  • @user4556274 In any case I can confirm that the problem is not that the processes are killed, in fact they do keep running, but that they behave differently. As I said I have a script that contains a simple while True: loop and that script runs fine, is not killed and I'm able to resume it without problems. I have also tried to add some subprocess and multiprocessing calls and they work fine. I'm at a loss of what is happening.
    – Bakuriu
    Aug 5 '16 at 14:14










  • Does the python script reside on an AFS or NFS filesystem?
    – Mark Plotnick
    Aug 5 '16 at 15:32






  • 1




    An explanation of what's going on is stackoverflow.com/questions/23571012/… . I don't have experience with AFS, but some pointers on how to extend access to the Kerberos tickets and AFS are given in that question's answers.
    – Mark Plotnick
    Aug 5 '16 at 15:44
















5












5








5


3





I have to run some tests on a server at the University. I have ssh access to the server from the desktop in my office. I want to launch a python script on the server that will run several tests during the weekend.



The desktop in the office will go on standby during the weekend and as such it is essential that the process continues to run on the server even when the SSH session gets terminated.



I know about nohup and screen and tmux, as described in questions like:




  • How to keep processes running after ending ssh session?

  • How can I close a terminal without killing the command running in it?


What am I doing right now is:




  • ssh username@server

  • tmux


  • python3 run_my_tests.py -> this script does a bunch of subprocess.check_output of an other script which itself launches some Java processes.

  • Tests run fine.

  • I use Ctrl+B, D and I detach the session.

  • When doing tmux attach I reobtain the tmux session which is still running fine, no errors whatsoever. I kept checking this for minutes and the tests run fine.

  • I close the ssh session


After this if I log in to the server via SSH, I do am able to reattach to the running tmux session, however what I see is something like:



Traceback (most recent call last):
File "run_my_examples.py", line 70, in <module>
File "run_my_examples.py", line 62, in run_cmd_aggr
File "run_my_examples.py", line 41, in run_cmd
File "/usr/lib64/python3.4/subprocess.py", line 537, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib64/python3.4/subprocess.py", line 858, in __init__
restore_signals, start_new_session)
File "/usr/lib64/python3.4/subprocess.py", line 1456, in _execute_child
raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied


I.e. the process that was spawning my running tests, right after the end of the SSH session, was completely unable to spawn other subprocesses. I have chmoded the permissions of all files involved and nothing changes.



I believe the servers use Kerberos for login/permissions, the server is Scientific Linux 7.2.



Could it be possible that the permissions of spawning new processes get removed when I log off from the ssh sessions? Is there something I can do about it? I have to launch several tests, with no idea how much time or space they will take...






  • The version of systemd is 219

  • The file system is AFS, using fs listacl <name> I can confirm that I do have permissions over the directories/files that are used by the script.










share|improve this question















I have to run some tests on a server at the University. I have ssh access to the server from the desktop in my office. I want to launch a python script on the server that will run several tests during the weekend.



The desktop in the office will go on standby during the weekend and as such it is essential that the process continues to run on the server even when the SSH session gets terminated.



I know about nohup and screen and tmux, as described in questions like:




  • How to keep processes running after ending ssh session?

  • How can I close a terminal without killing the command running in it?


What am I doing right now is:




  • ssh username@server

  • tmux


  • python3 run_my_tests.py -> this script does a bunch of subprocess.check_output of an other script which itself launches some Java processes.

  • Tests run fine.

  • I use Ctrl+B, D and I detach the session.

  • When doing tmux attach I reobtain the tmux session which is still running fine, no errors whatsoever. I kept checking this for minutes and the tests run fine.

  • I close the ssh session


After this if I log in to the server via SSH, I do am able to reattach to the running tmux session, however what I see is something like:



Traceback (most recent call last):
File "run_my_examples.py", line 70, in <module>
File "run_my_examples.py", line 62, in run_cmd_aggr
File "run_my_examples.py", line 41, in run_cmd
File "/usr/lib64/python3.4/subprocess.py", line 537, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib64/python3.4/subprocess.py", line 858, in __init__
restore_signals, start_new_session)
File "/usr/lib64/python3.4/subprocess.py", line 1456, in _execute_child
raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied


I.e. the process that was spawning my running tests, right after the end of the SSH session, was completely unable to spawn other subprocesses. I have chmoded the permissions of all files involved and nothing changes.



I believe the servers use Kerberos for login/permissions, the server is Scientific Linux 7.2.



Could it be possible that the permissions of spawning new processes get removed when I log off from the ssh sessions? Is there something I can do about it? I have to launch several tests, with no idea how much time or space they will take...






  • The version of systemd is 219

  • The file system is AFS, using fs listacl <name> I can confirm that I do have permissions over the directories/files that are used by the script.







ssh permissions tmux kerberos afs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 13 '17 at 12:37









Community

1




1










asked Aug 5 '16 at 13:56









Bakuriu

512521




512521












  • Are you using systemd 230 or more recent? Possibly related to bugs.debian.org/cgi-bin/bugreport.cgi?bug=825394
    – user4556274
    Aug 5 '16 at 14:07










  • @user4556274 Trying systemd-run --version tells me the server is using systemd 219.
    – Bakuriu
    Aug 5 '16 at 14:11










  • @user4556274 In any case I can confirm that the problem is not that the processes are killed, in fact they do keep running, but that they behave differently. As I said I have a script that contains a simple while True: loop and that script runs fine, is not killed and I'm able to resume it without problems. I have also tried to add some subprocess and multiprocessing calls and they work fine. I'm at a loss of what is happening.
    – Bakuriu
    Aug 5 '16 at 14:14










  • Does the python script reside on an AFS or NFS filesystem?
    – Mark Plotnick
    Aug 5 '16 at 15:32






  • 1




    An explanation of what's going on is stackoverflow.com/questions/23571012/… . I don't have experience with AFS, but some pointers on how to extend access to the Kerberos tickets and AFS are given in that question's answers.
    – Mark Plotnick
    Aug 5 '16 at 15:44




















  • Are you using systemd 230 or more recent? Possibly related to bugs.debian.org/cgi-bin/bugreport.cgi?bug=825394
    – user4556274
    Aug 5 '16 at 14:07










  • @user4556274 Trying systemd-run --version tells me the server is using systemd 219.
    – Bakuriu
    Aug 5 '16 at 14:11










  • @user4556274 In any case I can confirm that the problem is not that the processes are killed, in fact they do keep running, but that they behave differently. As I said I have a script that contains a simple while True: loop and that script runs fine, is not killed and I'm able to resume it without problems. I have also tried to add some subprocess and multiprocessing calls and they work fine. I'm at a loss of what is happening.
    – Bakuriu
    Aug 5 '16 at 14:14










  • Does the python script reside on an AFS or NFS filesystem?
    – Mark Plotnick
    Aug 5 '16 at 15:32






  • 1




    An explanation of what's going on is stackoverflow.com/questions/23571012/… . I don't have experience with AFS, but some pointers on how to extend access to the Kerberos tickets and AFS are given in that question's answers.
    – Mark Plotnick
    Aug 5 '16 at 15:44


















Are you using systemd 230 or more recent? Possibly related to bugs.debian.org/cgi-bin/bugreport.cgi?bug=825394
– user4556274
Aug 5 '16 at 14:07




Are you using systemd 230 or more recent? Possibly related to bugs.debian.org/cgi-bin/bugreport.cgi?bug=825394
– user4556274
Aug 5 '16 at 14:07












@user4556274 Trying systemd-run --version tells me the server is using systemd 219.
– Bakuriu
Aug 5 '16 at 14:11




@user4556274 Trying systemd-run --version tells me the server is using systemd 219.
– Bakuriu
Aug 5 '16 at 14:11












@user4556274 In any case I can confirm that the problem is not that the processes are killed, in fact they do keep running, but that they behave differently. As I said I have a script that contains a simple while True: loop and that script runs fine, is not killed and I'm able to resume it without problems. I have also tried to add some subprocess and multiprocessing calls and they work fine. I'm at a loss of what is happening.
– Bakuriu
Aug 5 '16 at 14:14




@user4556274 In any case I can confirm that the problem is not that the processes are killed, in fact they do keep running, but that they behave differently. As I said I have a script that contains a simple while True: loop and that script runs fine, is not killed and I'm able to resume it without problems. I have also tried to add some subprocess and multiprocessing calls and they work fine. I'm at a loss of what is happening.
– Bakuriu
Aug 5 '16 at 14:14












Does the python script reside on an AFS or NFS filesystem?
– Mark Plotnick
Aug 5 '16 at 15:32




Does the python script reside on an AFS or NFS filesystem?
– Mark Plotnick
Aug 5 '16 at 15:32




1




1




An explanation of what's going on is stackoverflow.com/questions/23571012/… . I don't have experience with AFS, but some pointers on how to extend access to the Kerberos tickets and AFS are given in that question's answers.
– Mark Plotnick
Aug 5 '16 at 15:44






An explanation of what's going on is stackoverflow.com/questions/23571012/… . I don't have experience with AFS, but some pointers on how to extend access to the Kerberos tickets and AFS are given in that question's answers.
– Mark Plotnick
Aug 5 '16 at 15:44












3 Answers
3






active

oldest

votes


















5














Thanks to Mark Plotnick I was able to identify and fix the issue.



The problem is the interaction between the AFS file system used by the server and Kerberos handling the authentication. The same issue was brought up in this question on SO.



Basically what is happening is that when I ssh into the server, Kerberos gives the authentication token to the session. This token is used also to access the AFS file system. When closing the SSH session this token gets destroyed and the processes running start to get permission denied errors when trying to access files on the AFS.



The way to fix this is to start a new window inside screen/tmux and launch the command:



kinit && aklog


After that you can detach from screen/tmux and close the ssh session safely.



The commands above create new Kerberos tokens and associate those with the screen/tmux session, in this way when the ssh connection is closed the initial tokens get revoked but since the subprocesses now use those you created they don't suffer permission denied errors.





To summarize:




  • ssh username@server

  • tmux

  • Launch the process you need to keep running

  • Create a new window with Ctrl+B, C

  • kinit && aklog

  • Detach from the session with Ctrl+B, D

  • Close ssh session






share|improve this answer























  • Could you please check? Ctrl+A,C kills the process in the current screen, how can this be fixed?
    – S_S
    Jun 10 '17 at 11:34










  • @Sumit it's CTRL+B, C using tmux.
    – Bakuriu
    Jun 10 '17 at 11:45



















0














Such errors probably related to the filesystem permissions.
Can you take a look on the server-side syslog events?



Maybe you need to stay logged in your environment
Take a look here to know more about Linux file permissions and issues, it may help.






share|improve this answer





























    0














    Try screen ssh $USER@$HOSTNAME on server.



    The kinit && aklog solution didn't work for me, but I found this "sshception" solution. Within screen, I ssh into the same machine and run my programs in that ssh session. Even if screen loses permission, the ssh session inside stays open and authenticated.






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f301530%2fwhy-do-i-get-permission-denied-error-when-i-log-out-of-the-ssh-session%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      5














      Thanks to Mark Plotnick I was able to identify and fix the issue.



      The problem is the interaction between the AFS file system used by the server and Kerberos handling the authentication. The same issue was brought up in this question on SO.



      Basically what is happening is that when I ssh into the server, Kerberos gives the authentication token to the session. This token is used also to access the AFS file system. When closing the SSH session this token gets destroyed and the processes running start to get permission denied errors when trying to access files on the AFS.



      The way to fix this is to start a new window inside screen/tmux and launch the command:



      kinit && aklog


      After that you can detach from screen/tmux and close the ssh session safely.



      The commands above create new Kerberos tokens and associate those with the screen/tmux session, in this way when the ssh connection is closed the initial tokens get revoked but since the subprocesses now use those you created they don't suffer permission denied errors.





      To summarize:




      • ssh username@server

      • tmux

      • Launch the process you need to keep running

      • Create a new window with Ctrl+B, C

      • kinit && aklog

      • Detach from the session with Ctrl+B, D

      • Close ssh session






      share|improve this answer























      • Could you please check? Ctrl+A,C kills the process in the current screen, how can this be fixed?
        – S_S
        Jun 10 '17 at 11:34










      • @Sumit it's CTRL+B, C using tmux.
        – Bakuriu
        Jun 10 '17 at 11:45
















      5














      Thanks to Mark Plotnick I was able to identify and fix the issue.



      The problem is the interaction between the AFS file system used by the server and Kerberos handling the authentication. The same issue was brought up in this question on SO.



      Basically what is happening is that when I ssh into the server, Kerberos gives the authentication token to the session. This token is used also to access the AFS file system. When closing the SSH session this token gets destroyed and the processes running start to get permission denied errors when trying to access files on the AFS.



      The way to fix this is to start a new window inside screen/tmux and launch the command:



      kinit && aklog


      After that you can detach from screen/tmux and close the ssh session safely.



      The commands above create new Kerberos tokens and associate those with the screen/tmux session, in this way when the ssh connection is closed the initial tokens get revoked but since the subprocesses now use those you created they don't suffer permission denied errors.





      To summarize:




      • ssh username@server

      • tmux

      • Launch the process you need to keep running

      • Create a new window with Ctrl+B, C

      • kinit && aklog

      • Detach from the session with Ctrl+B, D

      • Close ssh session






      share|improve this answer























      • Could you please check? Ctrl+A,C kills the process in the current screen, how can this be fixed?
        – S_S
        Jun 10 '17 at 11:34










      • @Sumit it's CTRL+B, C using tmux.
        – Bakuriu
        Jun 10 '17 at 11:45














      5












      5








      5






      Thanks to Mark Plotnick I was able to identify and fix the issue.



      The problem is the interaction between the AFS file system used by the server and Kerberos handling the authentication. The same issue was brought up in this question on SO.



      Basically what is happening is that when I ssh into the server, Kerberos gives the authentication token to the session. This token is used also to access the AFS file system. When closing the SSH session this token gets destroyed and the processes running start to get permission denied errors when trying to access files on the AFS.



      The way to fix this is to start a new window inside screen/tmux and launch the command:



      kinit && aklog


      After that you can detach from screen/tmux and close the ssh session safely.



      The commands above create new Kerberos tokens and associate those with the screen/tmux session, in this way when the ssh connection is closed the initial tokens get revoked but since the subprocesses now use those you created they don't suffer permission denied errors.





      To summarize:




      • ssh username@server

      • tmux

      • Launch the process you need to keep running

      • Create a new window with Ctrl+B, C

      • kinit && aklog

      • Detach from the session with Ctrl+B, D

      • Close ssh session






      share|improve this answer














      Thanks to Mark Plotnick I was able to identify and fix the issue.



      The problem is the interaction between the AFS file system used by the server and Kerberos handling the authentication. The same issue was brought up in this question on SO.



      Basically what is happening is that when I ssh into the server, Kerberos gives the authentication token to the session. This token is used also to access the AFS file system. When closing the SSH session this token gets destroyed and the processes running start to get permission denied errors when trying to access files on the AFS.



      The way to fix this is to start a new window inside screen/tmux and launch the command:



      kinit && aklog


      After that you can detach from screen/tmux and close the ssh session safely.



      The commands above create new Kerberos tokens and associate those with the screen/tmux session, in this way when the ssh connection is closed the initial tokens get revoked but since the subprocesses now use those you created they don't suffer permission denied errors.





      To summarize:




      • ssh username@server

      • tmux

      • Launch the process you need to keep running

      • Create a new window with Ctrl+B, C

      • kinit && aklog

      • Detach from the session with Ctrl+B, D

      • Close ssh session







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited May 23 '17 at 12:39









      Community

      1




      1










      answered Aug 5 '16 at 16:23









      Bakuriu

      512521




      512521












      • Could you please check? Ctrl+A,C kills the process in the current screen, how can this be fixed?
        – S_S
        Jun 10 '17 at 11:34










      • @Sumit it's CTRL+B, C using tmux.
        – Bakuriu
        Jun 10 '17 at 11:45


















      • Could you please check? Ctrl+A,C kills the process in the current screen, how can this be fixed?
        – S_S
        Jun 10 '17 at 11:34










      • @Sumit it's CTRL+B, C using tmux.
        – Bakuriu
        Jun 10 '17 at 11:45
















      Could you please check? Ctrl+A,C kills the process in the current screen, how can this be fixed?
      – S_S
      Jun 10 '17 at 11:34




      Could you please check? Ctrl+A,C kills the process in the current screen, how can this be fixed?
      – S_S
      Jun 10 '17 at 11:34












      @Sumit it's CTRL+B, C using tmux.
      – Bakuriu
      Jun 10 '17 at 11:45




      @Sumit it's CTRL+B, C using tmux.
      – Bakuriu
      Jun 10 '17 at 11:45













      0














      Such errors probably related to the filesystem permissions.
      Can you take a look on the server-side syslog events?



      Maybe you need to stay logged in your environment
      Take a look here to know more about Linux file permissions and issues, it may help.






      share|improve this answer


























        0














        Such errors probably related to the filesystem permissions.
        Can you take a look on the server-side syslog events?



        Maybe you need to stay logged in your environment
        Take a look here to know more about Linux file permissions and issues, it may help.






        share|improve this answer
























          0












          0








          0






          Such errors probably related to the filesystem permissions.
          Can you take a look on the server-side syslog events?



          Maybe you need to stay logged in your environment
          Take a look here to know more about Linux file permissions and issues, it may help.






          share|improve this answer












          Such errors probably related to the filesystem permissions.
          Can you take a look on the server-side syslog events?



          Maybe you need to stay logged in your environment
          Take a look here to know more about Linux file permissions and issues, it may help.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 8 '16 at 11:31









          Tim Connor

          511




          511























              0














              Try screen ssh $USER@$HOSTNAME on server.



              The kinit && aklog solution didn't work for me, but I found this "sshception" solution. Within screen, I ssh into the same machine and run my programs in that ssh session. Even if screen loses permission, the ssh session inside stays open and authenticated.






              share|improve this answer




























                0














                Try screen ssh $USER@$HOSTNAME on server.



                The kinit && aklog solution didn't work for me, but I found this "sshception" solution. Within screen, I ssh into the same machine and run my programs in that ssh session. Even if screen loses permission, the ssh session inside stays open and authenticated.






                share|improve this answer


























                  0












                  0








                  0






                  Try screen ssh $USER@$HOSTNAME on server.



                  The kinit && aklog solution didn't work for me, but I found this "sshception" solution. Within screen, I ssh into the same machine and run my programs in that ssh session. Even if screen loses permission, the ssh session inside stays open and authenticated.






                  share|improve this answer














                  Try screen ssh $USER@$HOSTNAME on server.



                  The kinit && aklog solution didn't work for me, but I found this "sshception" solution. Within screen, I ssh into the same machine and run my programs in that ssh session. Even if screen loses permission, the ssh session inside stays open and authenticated.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Dec 20 '18 at 4:17

























                  answered Dec 20 '18 at 2:31









                  Abdurrahman Akkas

                  11




                  11






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f301530%2fwhy-do-i-get-permission-denied-error-when-i-log-out-of-the-ssh-session%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Morgemoulin

                      Scott Moir

                      Souastre