[Bug 2839] SCP 'scp -r' Does Not Honor umask When Creating Directories

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Tue Mar 13 13:15:12 AEDT 2018


Darren Tucker <dtucker at dtucker.net> changed:

           What    |Removed                     |Added
                 CC|                            |dtucker at dtucker.net

--- Comment #1 from Darren Tucker <dtucker at dtucker.net> ---
Created attachment 3134
  --> https://bugzilla.mindrot.org/attachment.cgi?id=3134&action=edit
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.

You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.

More information about the openssh-bugs mailing list