Skip to content

Allow setting file permissions with create_file#820

Merged
byroot merged 1 commit into
rails:mainfrom
skipkayhil:hm-create-file-perm
May 10, 2023
Merged

Allow setting file permissions with create_file#820
byroot merged 1 commit into
rails:mainfrom
skipkayhil:hm-create-file-perm

Conversation

@skipkayhil

Copy link
Copy Markdown
Member

Ref rails/rails#48135

Previously, to restrict the permissions of a file created using create_file, chmod could be called right after. However, that leaves a short amount of time between when the file is first created and when the permissions are updated where another user could read the file.

This commit enables passing file permissions to create_file so that permissions can be set when the file is created.

Previously, to restrict the permissions of a file created using
create_file, chmod could be called right after. However, that leaves a
short amount of time between when the file is first created and when the
permissions are updated where another user could read the file.

This commit enables passing file permissions to create_file so that
permissions can be set when the file is created.
@casperisfine

Copy link
Copy Markdown

LGTM (ci failures are unrelated).

@rafaelfranca do you wanna have a look? Otherwise I'll merge.

@byroot byroot merged commit c16e7a1 into rails:main May 10, 2023
@skipkayhil skipkayhil deleted the hm-create-file-perm branch May 10, 2023 01:38
@rafaelfranca

Copy link
Copy Markdown
Member

👍🏽

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