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

Schema.php chmod the DumpConfigFile to 0644 #4163

Merged
merged 1 commit into from
Apr 23, 2019

Conversation

millerf
Copy link
Contributor

@millerf millerf commented Apr 20, 2019

Chmod the file. On some distribution, the php user write files too 'open', which generate a :
[Warning] World-writable config file 'my.cnf' is ignored
Therefore preventing the dump as it uses incorrect settings

Chmod the file. On some distribution, the php user write files too 'open', which generate a :
`[Warning] World-writable config file 'my.cnf' is ignored`
Therefore preventing the dump as it uses incorrect settings
@brandonkelly
Copy link
Member

This is what the defaultFileMode config setting is for. (See also defaultDirMode.)

@millerf
Copy link
Contributor Author

millerf commented Apr 23, 2019

@brandonkelly I know, but defaultFileMode is not used in writeTofile().
https://github.com/millerf/cms/blob/patch-1/src/helpers/FileHelper.php#L344

And I didn't want to create a big mess by modifying a "core" function such as writeToFile().

What should I do? Set the defaultFileMode instead of the 0644 here? Again, this is for a very specific reason and only to access the db for dumping. The file is deleted at the end of the operation anyway....

@brandonkelly brandonkelly reopened this Apr 23, 2019
@brandonkelly
Copy link
Member

Sorry, I misunderstood. All clear now.

@brandonkelly brandonkelly merged commit 7c7330d into craftcms:develop Apr 23, 2019
@brandonkelly
Copy link
Member

Thanks for the PR!

@millerf
Copy link
Contributor Author

millerf commented Apr 23, 2019

Thanks for taking the time to read it!!

brandonkelly added a commit that referenced this pull request Apr 23, 2019
angrybrad pushed a commit that referenced this pull request May 6, 2019
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.

2 participants