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

[FEATURE] Add permissions check for setfilepermissions.sh #2

Closed
wants to merge 1 commit into from

Conversation

wexi79
Copy link
Contributor

@wexi79 wexi79 commented Oct 21, 2015

Using the setfilepermissions.sh script fails due to wrong file permissions left by the composer installation (missing executable bit). Added the checking of the file's permissions, and correcting the file's permissions if needed.

Using the setfilepermissions.sh script fails due to wrong file permissions left by the composer installation (missing executable bit). Added the checking of the file's permissions, and correcting the file's permissions if needed.
@wexi79 wexi79 changed the title Add permissions check for setfilepermissions.sh [FEATURE] Add permissions check for setfilepermissions.sh Oct 22, 2015
@@ -20,6 +20,10 @@
}

if (isset($argv[1]) && ($argv[1] === 'typo3.flow:core:setfilepermissions' || $argv[1] === 'flow:core:setfilepermissions' || $argv[1] === 'core:setfilepermissions')) {
$perms = decoct(fileperms(__DIR__. '/setfilepermissions.sh') & 0777);
if ($perms != '700'){
Copy link
Member

Choose a reason for hiding this comment

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

seems like an indention error.
But apart from that: Instead of checking for 0700 wouldn't an is_executable() check work and be a bit less strict?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry about the indentation. As for the permissions, setfilepermissions.sh sets it's own mode to 700: "sudo chmod 700 $0" on line 76 so why would we allow it to be anything else?

@aertmann
Copy link
Contributor

Hey you need to push pull requests to the development repository, this is a read-only repository. See https://github.com/neos/flow-development-collection

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.

3 participants