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

feat(doctor) detect incorrect permissions #613

Merged
merged 1 commit into from Feb 4, 2018

Conversation

aileen
Copy link
Member

@aileen aileen commented Feb 3, 2018

refs #47
closes #294

  • Renames folderPermissions to installFolderPermissions
  • Adds two more tasks: filePermissions and folderPermissions which check for the correct permissions inside of the ghost installation folder
    • not enabled when local processmanager is used (= local install)
    • calls checkPermissions util
    • filePermissions does not check the versions and current folder
  • Refactors the contentFolderPermissions to be named contentFolder and disables task when content folder is not owned by ghost or ghost user is not found.
  • Adds checkPermissions util which takes a property to specify which check should run:
    • owner checks for ownership of the content folder
    • folder checks if directories within the ghost installation folder have the correct permission (775)
    • files checks if files within the ghost installation folder have the correct permissions (664)
  • Adds tests

@acburdine acburdine mentioned this pull request Feb 3, 2018
18 tasks
expect(error.options.environment).to.equal('testing');
expect(cwdStub.calledOnce).to.be.true;

env.cleanup();

This comment was marked as abuse.

@coveralls
Copy link

coveralls commented Feb 4, 2018

Coverage Status

Coverage increased (+0.02%) to 98.246% when pulling 7ffd595 on AileenCGN:folder-permissions into 8c68889 on TryGhost:master.

@aileen aileen force-pushed the folder-permissions branch 3 times, most recently from 07f4d7a to 79b1fbf Compare February 4, 2018 13:09
@aileen aileen force-pushed the folder-permissions branch 2 times, most recently from e126d72 to b1bbdc2 Compare February 4, 2018 14:49
refs TryGhost#47
closes TryGhost#294

- Renames `folderPermissions` to `installFolderPermissions`
- Adds two more tasks: `filePermissions` and `folderPermissions` which check for the correct permissions inside of the ghost installation folder
	- not enabled when local processmanager is used (= local install)
	- calls `checkPermissions` util
	- `filePermissions` does not check the versions and current folder
- Refactors the `contentFolderPermissions` to be named `contentFolder` and disables task when content folder is not owned by ghost or ghost user is not found.
- Adds `checkPermissions` util which takes a property to specify which check should run:
	- `owner` checks for ownership of the content folder
	- `folder` checks if directories within the ghost installation folder have the correct permission (775)
	- `files` checks if files within the ghost installation folder have the correct permissions (664)
- Adds tests
Copy link
Member

@acburdine acburdine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@acburdine acburdine merged commit 6b614f7 into TryGhost:master Feb 4, 2018
@aileen aileen deleted the folder-permissions branch May 10, 2018 01:50
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

Successfully merging this pull request may close these issues.

Ghost folder & file permissions
4 participants