Re: Why does sftp-client create new local files with the remote file permissions when preserve_flag it NOT specified?

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On Fri, 21 Aug 2020, Matthew Sienkiewicz wrote:

> Fantastic Friday All, 
> 
> I was tracking down a problem with SFTP retrieved files having
> unexpected file permissions.
>
> The remote file permissions were 0070.  
> 
> The local file did not exist before the transfer request.
> The local account had a umask of 0022.
> The local file permissions after the transfer were 0250.

This is because the sftp protocol has no notion of a user's umask - all
permissions are passed explicitly in the protocol, so it has to pick a
default. The default we chose was the permissions of the origin file.

An alternative might be to implement the notion of a umask in the client,
but I think the current behaviour should stay as default for safety and
backwards conmpatibility.

-d
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux