Skip to content

Commit

Permalink
fix accounts_users_home_files_ownership bash remediation to handle sy…
Browse files Browse the repository at this point in the history
…mlinks properly
  • Loading branch information
a-skr committed Nov 7, 2024
1 parent f549594 commit 7adc6db
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ for user in $(awk -F':' '{ if ($3 >= {{{ uid_min }}} && $3 != {{{ nobody_uid }}}
# Only update the ownership when necessary. This will avoid changing the inode timestamp
# when the owner is already defined as expected, therefore not impacting in possible integrity
# check systems that also check inodes timestamps.
find $home_dir -not -user $user -exec chown -f $user {} \;
find $home_dir -not -user $user -exec chown -f --no-dereference $user {} \;
done

0 comments on commit 7adc6db

Please sign in to comment.