-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
"ghost update" asks for sudo password to run "systemctl is-active" #882
Comments
@acburdine It's not 100% clear to me why sudo is required in this case. Refs #672. |
Hmm...I'll look into it some and see if I can figure out why people were seeing issues before without |
Thanks @acburdine 👍 |
I'm having this as well. Attempts to do a I've updated For now I've modified the ghostuser to have a password and added to sudoers. Ouch. |
The change that prompted this issue also prevented me from automatically updating ghost using systemd. I created /etc/systemd/system/update_ghost.service:
This resulted in the following in the systemd log:
I found this issue on the top of the results. What I tried:
What I finally realized would solve this: I went with:
Note: User refers to the UID of your ghostuser, which may differ from 1000. The location of your ghost blog may vary as well. Then I added the following lines to my sudoers file using visudo:
Note: ghostuser and ghost_website will differ based on your settings. And was able to automate the updates just fine. |
I wrote a blog about it here https://boxofcables.dev/automate-ghost-updates-with-systemd/ |
Our bot has automatically marked this issue as stale because there has not been any activity here in some time. The issue will be closed soon if there are no further updates, however we ask that you do not post comments to keep the issue open if you are not actively working on a PR. We keep the issue list minimal so we can keep focus on the most pressing issues. Closed issues can always be reopened if a new contributor is found. Thank you for understanding 🙂 |
Welcome to Ghost-CLI's GitHub repo! 👋🎉
Do you need help or have a question? Please come chat in our forum: https://forum.ghost.org 👫.
Docs: https://docs.ghost.org 📖.
Please be aware that the team behind the Ghost CLI only supports the recommended stack: https://github.com/TryGhost/Ghost-cli#recommended-stack.
Summary
Search GitHub for existing issues & check the docs: https://docs.ghost.org/faq/errors/. If you're still stuck, please provide a quick summary of the problem, steps to reproduce, and full tech details including logs.
Steps to Reproduce
Switch to ghost service user and navigate to the ghost installation directory
Attempt to upgrade ghost with "ghost upgrade"
Technical details
Script attempts to ask for a sudo password to run "systemctl is-active". "systemctl is-active" does not require elevated privileges to run. Ghost is not making proper usage of file/user permissions and the service account.
Bug submission checklist
Please fill out this checklist to acknowledge that you followed the requirements to submit a bug report.
The text was updated successfully, but these errors were encountered: