| Summary: | SCP 'scp -r' Does Not Honor umask When Creating Directories | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | The Veritable Bugeater <bugeater> | ||||
| Component: | scp | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED FIXED | ||||||
| Severity: | normal | CC: | djm, dtucker | ||||
| Priority: | P5 | ||||||
| Version: | 7.2p2 | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 2852 | ||||||
| Attachments: |
|
||||||
|
Description
The Veritable Bugeater
2018-03-13 07:36:48 AEDT
Created attachment 3134 [details]
apply umask to file creation mode
The reason is that files are chmodded accounting for the umask but directories are not.
This patch applies the umask to the incoming modes, which will mean that both files and directories will have the correct umask when created, which is I think the right thing to do (since it removes a race between file creation and chmod where the files may have more permissive modes than the umask specifies).
I'm not sure if there's any other corner cases, though.
Move to OpenSSH 7.8 tracking bug Patch applied and will be in the 7.8 release. Thanks for the report. Close RESOLVED bugs with the release of openssh-8.0 |