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

Ftw chmod #376

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Ftw chmod #376

wants to merge 1 commit into from

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
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.

2 participants