Skip to content

Task in cis_6.2.x.yml Sets Execute Bit on All New Files in Home Directory #127

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

Open
bene-tyler opened this issue Apr 18, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@bene-tyler
Copy link

The following task in cis_6.2.x.yml sets a default ACL of r-x for the group on user home directories:

      # set default ACLs so the homedir has an effective umask of 0027
      - name: "6.2.10 | PATCH | Ensure local interactive user home directories exist | Set group ACL"
        ansible.posix.acl:
            path: "{{ item }}"
            default: true
            etype: group
            permissions: rx
            state: present
        loop: "{{ discovered_interactive_users_home.stdout_lines }}"
        when: not system_is_container

This causes all new files created inside the home directory to inherit the execute bit for group, even if they aren’t intended to be executable. For example, checking out a Git repository results in every file being marked with mode 100755 instead of 100644.

This behavior:

Deviates from typical umask 0027 expectations,
Introduces incorrect file permissions,
Breaks workflows involving source control or deployment tools.

Suggested Fix
Update the permissions to r (read-only) instead of rx, to prevent accidental propagation of execute bits to regular files:

@bene-tyler bene-tyler added the bug Something isn't working label Apr 18, 2025
@frederickw082922 frederickw082922 self-assigned this Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants