You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initiate a ghost instance without systemd unit setup
Change the ownership of the folder and subfolders to simulate wrong ownership
Execute ghost setup systemd
Output
myuser@mymachine:/var/www/tmlmt/blog$ ghost setup systemd
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
The "ghost" user has not been created, try running `ghost setup linux-user` first
ℹ Setting up Systemd [skipped]
Expected behavior
I would expect the systemd step to be executed, not skipped
Analysis
The systemd step checks whether the ghost user exists using the getUid function and checking whether the return value evaluates as false
returntask.skip('The "ghost" user has not been created, try running `ghost setup linux-user` first');
}
But that function actually does two things: it returns the uid of the ghost user when it exists, or if returns null if the directory is not owned by that user.
// Ghost user is not the owner of this folder, return null
returnnull;
}
The logic above should probably be changed either to explicitely separate the two distinct checks that are made, so that, in case the directory's ownership is not correct, the message error doesn't refer to the ghost user not existing, when it does.
Technical details
This is automatically output by Ghost-CLI if an error occurs, please copy & paste:
OS: Ubuntu 24.04
Node Version: 18.20.4
Ghost-CLI Version: 1.26.1
Environment: bash
Command: ghost setup systemd
Bug submission checklist
Please fill out this checklist to acknowledge that you followed the requirements to submit a bug report.
Tried to find help in the forum & docs
Checked for existing issues
Attached log file
Provided technical details incl. operating system
The text was updated successfully, but these errors were encountered:
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 🙂
Steps to Reproduce
ghost setup systemd
Output
Expected behavior
I would expect the systemd step to be executed, not skipped
Analysis
The systemd step checks whether the ghost user exists using the getUid function and checking whether the return value evaluates as
false
Ghost-CLI/extensions/systemd/index.js
Lines 38 to 43 in 79bfa47
But that function actually does two things: it returns the uid of the ghost user when it exists, or if returns
null
if the directory is not owned by that user.Ghost-CLI/extensions/systemd/get-uid.js
Lines 13 to 21 in 79bfa47
The logic above should probably be changed either to explicitely separate the two distinct checks that are made, so that, in case the directory's ownership is not correct, the message error doesn't refer to the ghost user not existing, when it does.
Technical details
This is automatically output by Ghost-CLI if an error occurs, please copy & paste:
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: