Allow different file modes to be created#147
Open
mbr-phys wants to merge 1 commit into
Open
Conversation
Owner
|
Hi @mbr-phys , thanks but I am not sure I am generally keen on this one. I would at least require an implementation that does not depend on a global variable. Another issue is that you will not necessary get what you asked for, as this will be overridden by the process umask and the parent folder's ACL. So in short, although it is well motivated, it would be much less fragile to deal with this through the job environment. However: the job environment can only restrict permissions, not add them, so one can easily argue that Hadrons using 755 by default is too restrictive. So:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a global fileDirMode parameter controlling the permissions requested for directories created by Hadrons output helpers.
This allows projects to create group-writable Hadrons output directories, e.g. 0775, directly at point of creation to avoid manually changing file permissions after the fact when multiple people are running production.
Previously, Hadrons::mkdir() always requested 0755, so directories created by makeFileDir() could not become group-writable even when jobs were submitted with e.g. umask 002. The new parameter defaults to 755, but can be set in the global XML parameters block, e.g.:
<fileDirMode>775</fileDirMode>The value is parsed as an octal Unix permission mode and validated before being used. Missing or empty values fall back to 755.
Changes