My $HOME on a server is in a Andrew file system, and the server runs kerberos.

I created a tmux session, wherein I ran a shell process. Then I detached it, and logged out, and after a while logged in again and reattach the tmux session. In the shell process in tmux, I found that I didn't have permission to access my (non-directory) files in $HOME. I checked my ticket and it didn't expire, and I renewed it by running krenew and still didn't have permission.

$ ls -l
ls: cannot access README: Permission denied
ls: cannot access setup.sh: Permission denied
ls: cannot access setup.sh~: Permission denied
total 14
drwxrwxr-x.  2 t 2048 Apr  6 21:48 bin
drwxrwxr-x. 11 t 2048 Apr 24 18:16 data
???????????  ? ?    ?     ?            ? README.md
???????????  ? ?    ?     ?            ? setup.sh
???????????  ? ?    ?     ?            ? setup.sh~
drwxrwxr-x.  2 t 2048 Apr 22 18:50 src



The dirty solution is to update tmux's value for $KRB5CCNAME. First, run this outside tmux:

$ echo $KRB5CCNAME

Then, inside tmux, you need to export that new value:

$ export KRB5CCNAME='FILE:/tmp/krb5cc_201108_XXXXXX'

Now, tmux has your new credentials.

|improve this answer|||||

You might have a valid ticket, but you most likely don't have valid AFS tokens. Try running aklog to get tokens from your existing cached credentials. Check the output of tokens to see if you have valid tokens. Make sure that with your krenew that you run aklog (which is simply an additional parameter to krenew).

|improve this answer|||||

Here is a clean solution that worked for me. Log into any tmux session and -

$ kinit
$ aklog
|improve this answer|||||
  • Awesome! This worked for me. – Jo Be Jun 25 '19 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.