Can someone explain this error for me and why I am receiving it?

"Can't continue. We can't safely access \"/home/ubuntu/.op\" because it's not owned by the current user. Change the owner or logged in user and try again"

when is this error thrown and why?
I am running bash scripts using sudo permissions, and then logging into op using ubuntu user, from then on I run an ansible script also using onepassword cli. I am assuming that somewhere along the way something got mixed up such that I cannot log in.

If someone can provide some more insight on this error that would be fantastic.


1Password Version: 0.9.4
Extension Version: Not Provided
OS Version: ubuntu
Sync Type: Not Provided


  • BenBen AWS Team

    Team Member

    Hi @joeyliu

    Could you please run this command and let us know the output?

    ls -l /home/ubuntu/.op



  • total 4
    -rw------- 1 ubuntu ubuntu 268 Apr 14 23:13 config

  • BenBen AWS Team

    Team Member

    That looks right, @joeyliu. I'm wondering then if op is being run as root (via sudo)? Can you check which user op is actually getting executed as? Off hand I'm not sure what the best way to do that is, but perhaps top can help (check the UID of the op process).


  • felix_1pfelix_1p 1Password Alumni
    edited April 2020

    If I may jump in here, running op via sudo could indeed cause this issue. Try to run op as the user that owns the .op directory. But if that's not possible I'd like to learn more about your specific use case.

This discussion has been closed.