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

fix(doctor): Folder permissions check considers setuid, setgid, and sticky bits #729

Merged

Conversation

snarlynarwhal
Copy link
Contributor

@snarlynarwhal snarlynarwhal commented May 25, 2018

fix(doctor): Folder permissions check considers setuid, setgid, and sticky bits

closes #724

  • Prefixed the folder permissions check help command chmod parameter with "00" to clear the setuid, setgid, and sticky bits
  • Updated the unit tests for folder permissions to coincide with aforementioned change

…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
@coveralls
Copy link

coveralls commented May 25, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling c24823b on snarlynarwhal:feature/folder-permissions-patch into fed2cb8 on TryGhost:master.

@@ -18,7 +18,7 @@ module.exports = function checkPermissions(type, task) {
},
folder: {
command: 'find ./ -type d ! -perm 775 ! -perm 755',
help: `Run ${chalk.green('sudo find ./ -type d -exec chmod 775 {} \\;')} and try again.`
help: `Run ${chalk.green('sudo find ./ -type d -exec chmod 00775 {} \\;')} and try again.`

This comment was marked as abuse.

@vikaspotluri123
Copy link
Member

I'm thinking about if we need to add the leading zeros to the files help command as well. According to the manual, the sticky bit is cleared if the user executing the command isn't the owner or isn't in the group (of course T+C apply). Given that and the fact the user shouldn't be the owner (because Ghost should own the content folder), it seems like the owner check + the chmod command should cause the system to fix it 🤔

@snarlynarwhal
Copy link
Contributor Author

I played around with it a bit the other day and special permissions on files did not seem to affect the installation - probably because the system fixed it as you said.

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.

lgtm 👍 thanks @snarlynarwhal!

@acburdine acburdine merged commit a0a31a9 into TryGhost:master May 28, 2018
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-CLI failing on: Checking folder permissions
4 participants