Skip to content

create a function to create file with forced permissions#10870

Open
sylvestre wants to merge 9 commits intouutils:mainfrom
sylvestre:create_file_restrictive_perm
Open

create a function to create file with forced permissions#10870
sylvestre wants to merge 9 commits intouutils:mainfrom
sylvestre:create_file_restrictive_perm

Conversation

@sylvestre
Copy link
Copy Markdown
Contributor

No description provided.

@sylvestre sylvestre force-pushed the create_file_restrictive_perm branch 3 times, most recently from 10750f4 to 551598e Compare February 10, 2026 22:14
@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cp/acl. tests/cp/acl is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/preserve-mode. tests/cp/preserve-mode is passing on 'main'. Maybe you have to rebase?

@sylvestre sylvestre force-pushed the create_file_restrictive_perm branch from 551598e to 6934fe4 Compare February 14, 2026 19:15
@sylvestre sylvestre marked this pull request as ready for review February 14, 2026 20:50
@ChrisDryden
Copy link
Copy Markdown
Collaborator

ChrisDryden commented Feb 14, 2026

I'm curious where the justification for this comes from?

I have been reading up on these options and what the default File create does and I think the default behaviour is mode o666 and when running commands to compare what is used by the gnu commands the only command that I could find of these that used a more restrictive mode was cp and that the other ones do not have this behaviour

for example for gnu touch which matches main:

-rw-rw-rw-

Which is now:

-rw-------

But the two gnu compatibility improvements I do see in the PR is that this is a step forward with the right behavior for cp and the sort file creation was missing the truncate flag.

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