-
-
Notifications
You must be signed in to change notification settings - Fork 229
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-CLI failing on: Checking folder permissions #724
Comments
Hey @snarlynarwhal 👋
I'm not sure I understand, the output tells you to run a command:
When you created the installation folder, after setting the ownership to your user, did you also run the command to change the permissions?
I am closing this as I don't believe this is a bug in the CLI. Please come over to our forum if you need help. If it turns out to be a bug indeed, we can always reopen this issue. |
I ran the command it prompted me too and More info: So I started from scratch (wayyyy too many times) and found that it installs just fine. |
So I discovered the issue arose from special permission modes: setuid, setgid, and sticky bit. I removed them using |
@snarlynarwhal that's interesting - didn't know about special permissions modes. Feel free to propose a fix if you find one that works - either a fix in how we check directory permissions or a fix that just adds 000 to the bits of the suggested command 😄 |
I submitted a document proposal to include the command to remove directory flags as a step in the installation process - hopefully that helps prevent other users from overlooking the Knowledge Base section as I did! |
Sorry to wade in - I rejected the docs change not because I think the point is invalid, but because I don't think adding yet another step to our already complex install is the right solution, especially given that this is not a common case. What I think we should do:
@snarlynarwhal the existing checks live here: https://github.com/TryGhost/Ghost-CLI/blob/master/lib/commands/doctor/checks/check-permissions.js#L14. Advice or a PR to adjust this would be greatly appreciated. |
Oh derp, @acburdine already proposed a better solution (read his comment before coffee.. didn't process haha): instead of adding the additional command, pretty sure |
If that's the case, then merging the prefix into the command should be fine - the fix that was discussed was kind of convoluted because I wasn't aware of the If you don't want / are unable to create a fix pr, let me know as I will create one on your behalf 😄 |
Okay cool 👍 I can go ahead and create a pr later today |
…icky bits Closes TryGhost#724 - Prefixed the folder permissions check help command chmod paramter with "00" to clear the setuid, setgid, and sticky bits - Updated the unit tests for folder permissions to coincide with aforementioned change
I had an essay written about chmod and how it works, but Wikipedia + chmod manual ended up sumarizing it into a single sentence 😬 For future reference, in Linux, "To clear these [sticky] bits for directories with a numeric mode requires an additional leading zero, or leading = like 00755 , or =755" |
I'm having the same issue, but I don't care that some content directories aren't the "right" permissions. Can I ignore that with a flag or something so it doesn't prevent me from starting the script? |
Not at the moment, adding support to disable these checks is something planned for the future as part of #47 |
@radonthetyrant the reason those checks are there is because without the correct file permissions, you may have issues getting Ghost to run properly. There has been some thought into adding skip flags for certain checks, but the intention behind these checks was to make sure that Ghost has the optimal environment to run in, and so that users (esp. non-technical ones) would be helped to fix their own installations without needing to contact support every time 😉 |
@acburdine yes, I understood its purpose. I still have trouble wrapping my head around how it seems to be enforced, when I can have valid reasons to not want to chown hundred times between two users just to make edits. It seems tedious and, for users that are more advanced and can work out any permission-related issues, restrictive. |
This issue is a bug report.
Summary
While following the Install & Setup (production) tutorial, the installation fails at: Checking folder permissions
Steps to Reproduce (for a bug report)
Follow the instructions for the Install & Setup (production) tutorial.
I follow the steps in the Installing on Linux tutorial and fail at
ghost install
,ghost setup
, andghost doctor
at the exact same point: whenChecking folder permissions
. I receive a very uninformative (maybe give details about which user needs what access to where) message that states:Then it proceeds to list out each and every file/folder inside of the following folders:
Here's my
ls -al
output just to verify everything has the right permissions (at least based on the tutorial):Log file (for a bug report)
Technical details (for a bug report)
The exact recommended stack.
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: