Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Popeye to be used by more than one user on a host (/tmp/popeye.log permission problem) #301

Open
jim-barber-he opened this issue Mar 27, 2024 · 0 comments

Comments

@jim-barber-he
Copy link




Is your feature request related to a problem? Please describe.

I manage multiple clusters, and on my system I sudo to different user IDs to manage them.
If I run popeye as one user, it creates a /tmp/popeye.log owned by the user.
If I then try to run popeye as another user it errors like so:

$ popeye version     
Unable to create Popeye log file open /tmp/popeye.log: permission denied. Exiting...

It would be good to be able to have popeye work around this limitation.

Describe the solution you'd like

To be able to run popeye as one user, then be able to run it as another user without the original user (or root) having to remove the /tmp/popeye.log file first.

Describe alternatives you've considered

As for implementation there are so many valid ways you can tackle this, that it would be up you.
E.g.

  • Create a /tmp/popeye-$UID.log file instead.
  • Create a /tmp/popeye-$PID.log file instead.
  • Keep creating /tmp/popeye.log and if it can't be written to fall back on one of the options above.
  • Keep creating /tmp/popeye.log and if it can't be written to proceed with a warning (configurable to be turned off) and don't produce a log file at all.
  • Provide an option to not create a popeye.log file at all (configurable via an environment variable would be nice)
  • Create a /tmp/$UID/popeye.log instead.
    And so on.

Additional context
Add any other context or screenshots about the feature request here.

Hopefully the above captures my request.

tmojzes pushed a commit to tmojzes/popeye that referenced this issue Sep 13, 2024
desc: Fixes log file creation if Popeye was run with root user on linux.
      The file creation was failing with permission denied error.
      It was mentioned here: derailed#301

[email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant