Skip to content

Add dir_mode to file.copy state#62650

Merged
garethgreenaway merged 1 commit into
saltstack:masterfrom
lkubb:file-copy-makedirs
Sep 21, 2022
Merged

Add dir_mode to file.copy state#62650
garethgreenaway merged 1 commit into
saltstack:masterfrom
lkubb:file-copy-makedirs

Conversation

@lkubb
Copy link
Copy Markdown
Contributor

@lkubb lkubb commented Sep 11, 2022

What does this PR do?

Adds a dir_mode argument to file.copy state. Also defaults this dir_mode to mode + execute bits set instead of the file mode, which seems like a poor default.

What issues does this PR fix or reference?

Fixes: #62426

Previous Behavior

Created parent directories had the same permissions as the file.

New Behavior

Created parent directories by default have the execute bit set. The directory mode is configurable.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@lkubb lkubb requested a review from a team as a code owner September 11, 2022 14:19
@lkubb lkubb requested review from garethgreenaway and removed request for a team September 11, 2022 14:19
@garethgreenaway garethgreenaway merged commit 6558946 into saltstack:master Sep 21, 2022
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.

[BUG] file.copy state with makedirs uses file permissions on created directories

2 participants