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

mkdir: set correct permissions on dirs created by -p #4876

Merged
merged 5 commits into from
May 22, 2023

Conversation

shinhs0506
Copy link
Contributor

should fix mkdir/perm.sh

  1. default permission created by mkdir is a=rwx (0o0777)
  2. permission of parent dirs created by -p argument is =rwx,u+wx, which is umask modified by u+wx

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/mkdir/perm is no longer failing!

@sylvestre
Copy link
Contributor

GNU testsuite comparison:

Congrats! The gnu test tests/mkdir/perm is no longer failing!

bravo :)

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/mkdir/perm is no longer failing!
Congrats! The gnu test tests/tail-2/inotify-dir-recreate is no longer failing!

@cakebaker
Copy link
Contributor

The two new tests (test_mkdir_parent_mode and test_mkdir_parent_mode_check_existing_parent) pass, even though I didn't apply any of the changes to mkdir.rs. Is that intentional?

@shinhs0506
Copy link
Contributor Author

Oops, I updated the tests, they should fail now. Thanks for catching that

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/mkdir/perm is no longer failing!
GNU test failed: tests/tail-2/inotify-dir-recreate. tests/tail-2/inotify-dir-recreate is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/mkdir/perm is no longer failing!

@sylvestre sylvestre merged commit c915207 into uutils:main May 22, 2023
@sylvestre
Copy link
Contributor

thanks :)

@niyaznigmatullin
Copy link
Contributor

I ran the test locally, and the test test_symbolic_alteration fails after this change. I think it does because my umask is 0002, which is default in my terminal, but if umask is set to 0022, then it starts working correctly. We already discussed umask issues here #3645. In my opinion, that kind of tests have to set umask explicitly before running mkdir -m, so that the tests work in every terminal window, no matter what umask is set there.

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.

4 participants