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

copy module: avoid sprurious updates of destination directory permissions #80384

Closed
wants to merge 1 commit into from

Conversation

h3nd24
Copy link

@h3nd24 h3nd24 commented Apr 3, 2023

SUMMARY

Fixes #79725:

  • Refactored when we are calling chown_recursive. Now it is called when we are copying the file / directory in the copy_diff_files and copy_left_only, also called when we are creating new directory when the target is non-existent
  • Changed a bit on how chown_recursive works. Now it also may change the ownership and group of the target file / directory
  • Opportunistically fixed the problem where local_follow doesn't specify the default, which means when undefined, links are not copied across
  • Opportunistically fixed the problem where check mode under certain circumstances will override the ownership and group
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

copy module

ADDITIONAL INFORMATION

@ansibot ansibot added affects_2.15 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. labels Apr 3, 2023
@ansibot
Copy link
Contributor

ansibot commented Apr 3, 2023

The test ansible-test sanity --test pep8 [explain] failed with 4 errors:

lib/ansible/modules/copy.py:360:74: W291: trailing whitespace
lib/ansible/modules/copy.py:361:58: W291: trailing whitespace
lib/ansible/modules/copy.py:362:74: W291: trailing whitespace
lib/ansible/modules/copy.py:477:1: E302: expected 2 blank lines, found 1

click here for bot help

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Apr 3, 2023
@mattclay mattclay added ci_verified Changes made in this PR are causing tests to fail. and removed needs_triage Needs a first human triage before being processed. labels Apr 3, 2023
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Apr 11, 2023
@bcoca bcoca changed the title Fixes #79725 copy module copy module: avoid sprurious updates of destination directory permissions Aug 2, 2023
@bcoca
Copy link
Member

bcoca commented Aug 2, 2023

waiting_on_contributor

@s-hertel
Copy link
Contributor

closing for inactivity

@s-hertel s-hertel closed this Mar 20, 2024
@ansible ansible locked and limited conversation to collaborators Apr 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.15 bug This issue/PR relates to a bug. ci_verified Changes made in this PR are causing tests to fail. has_issue module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. new_contributor This PR is the first contribution by a new community member. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ansible.builtin.copy module - updates pre-existing files' ownership of dest directory if remote_src: true
5 participants