Skip to content

temp files: inherit permissions only for owner#21092

Closed
icing wants to merge 1 commit intocurl:masterfrom
icing:temp-file-permissions
Closed

temp files: inherit permissions only for owner#21092
icing wants to merge 1 commit intocurl:masterfrom
icing:temp-file-permissions

Conversation

@icing
Copy link
Copy Markdown
Contributor

@icing icing commented Mar 25, 2026

When creating a temp file in order to later replace an original, copying over the existing permissions can not be considered safe when the user running libcurl is not the owner of the existing file.

When creating a temp file in order to later replace an original, copying
over the existing permissions can not be considered safe when the user
running libcurl is not the owner of the existing file.
@icing
Copy link
Copy Markdown
Contributor Author

icing commented Mar 25, 2026

This could cause breakage in some weird use cases where different uid processes try to manage a shared resource file. It sounds like a strange operation mode, though. But applications have been known to be "inventive" in the past...

Comment thread lib/curl_fopen.c
@bagder bagder closed this in 8deaf04 Mar 30, 2026
dkarpov1970 pushed a commit to dkarpov1970/curl that referenced this pull request Apr 7, 2026
When creating a temp file in order to later replace an original, copying
over the existing permissions can not be considered safe when the user
running libcurl is not the owner of the existing file.

Closes curl#21092
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants