[RFC] per-branch umask

John Arbash Meinel john at arbash-meinel.com
Thu Dec 15 18:46:07 GMT 2005


Matthieu Moy wrote:
> Jan Hudec <bulb at ucw.cz> writes:
> 
> 
>>Ok or not, sftp does not support setting umask, so it's the only way
>>(short of requiring users to create wrapers for the sftp server).
> 
> 
> If the performance loss is visible, then there should be a way to
> disable the chmod.
> 

Actually, I found a better way. The CMD_OPEN call for sftp lets you
specify a file mode at creation time.
Since sftp.put() always uses _sftp_open_exclusive() and puts the file
into a temporary file, we probably don't have to chmod the file again.

Which means that the only real overhead is an extra stat() call when you
open the branch, to determine the permissions of the branch. And a
couple extra bytes which pass the mode bits.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051215/9e9c9625/attachment.pgp 


More information about the bazaar mailing list