Skip to content

Conversation

@JRF63
Copy link
Contributor

@JRF63 JRF63 commented Nov 14, 2024

  • - Fix modestr::mutate
  • - modestr::mutate tests
  • - Use ftw on chmod
  • - chmod tests

This mostly matches coreutils' behavior with the exception of these two:

  • Allowing the use of octal integers in conjuction with +, - or =.
    This seems to conflict with the "For an octal integer mode operand, the file mode bits shall be set absolutely" in the standard.

    Ex:

    chmod -222 f
  • When removing permissions, error when umask conflicts with unspecified who (u, g, or o not specified).
    This one isn't in the spec and coreutils' handling is rather arbitrary (only gives the error when there is a single clause).

    Ex:

    touch f
    chmod 777 f
    chmod -w f # chmod: f: new permissions are rwxrwxrwx, not r-xr-xr-x

@JRF63 JRF63 marked this pull request as draft November 14, 2024 15:43
Copy link

@143h2ng 143h2ng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JRF63 JRF63 force-pushed the ftw-chmod branch 3 times, most recently from 900b87b to 2bdd15d Compare January 22, 2025 16:44
@JRF63 JRF63 marked this pull request as ready for review January 22, 2025 17:05
@jgarzik jgarzik merged commit 05a7d4a into rustcoreutils:main Apr 2, 2025
2 checks passed
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.

3 participants