Comment 16 for bug 50568

Revision history for this message
John A Meinel (jameinel) wrote : Re: 'bzr push' does not preserve sgid bit on newly created directories

Can you elaborate with a test script?

In my testing with a Pack repository, I see:

drwxrwsr-x 4 jameinel bzrusers 168 Oct 22 14:10 .bzr/
drwxrwsr-x 3 jameinel jameinel 96 Oct 22 14:10 test/
drwxr-sr-x 3 jameinel jameinel 72 Oct 22 14:14 test-bzr+ssh/
drwxrwsr-x 3 jameinel jameinel 72 Oct 22 14:13 test-sftp/

And then for new files:
.bzr/repository/indices:
total 48
-rw-rw-r-- 1 jameinel bzrusers 192 Oct 22 14:13 8f5d35c66e891b556673b032c52d5fd4.iix
-rw-rw-r-- 1 jameinel bzrusers 187 Oct 22 14:13 8f5d35c66e891b556673b032c52d5fd4.rix
-rw-rw-r-- 1 jameinel bzrusers 60 Oct 22 14:13 8f5d35c66e891b556673b032c52d5fd4.six
-rw-rw-r-- 1 jameinel bzrusers 60 Oct 22 14:13 8f5d35c66e891b556673b032c52d5fd4.tix
-rw-rw-r-- 1 jameinel bzrusers 192 Oct 22 14:14 916267eb715bcaadf4b026cbe061ac8b.iix
-rw-rw-r-- 1 jameinel bzrusers 187 Oct 22 14:14 916267eb715bcaadf4b026cbe061ac8b.rix
-rw-rw-r-- 1 jameinel bzrusers 60 Oct 22 14:14 916267eb715bcaadf4b026cbe061ac8b.six
-rw-rw-r-- 1 jameinel bzrusers 60 Oct 22 14:14 916267eb715bcaadf4b026cbe061ac8b.tix
-rw-rw-r-- 1 jameinel bzrusers 127 Oct 22 14:10 c4ca1ce789afb4c8701fba569200647c.iix
-rw-rw-r-- 1 jameinel bzrusers 126 Oct 22 14:10 c4ca1ce789afb4c8701fba569200647c.rix
-rw-rw-r-- 1 jameinel bzrusers 60 Oct 22 14:10 c4ca1ce789afb4c8701fba569200647c.six
-rw-rw-r-- 1 jameinel bzrusers 164 Oct 22 14:10 c4ca1ce789afb4c8701fba569200647c.tix

.bzr/repository/packs:
total 12
-rw-rw-r-- 1 jameinel bzrusers 562 Oct 22 14:13 8f5d35c66e891b556673b032c52d5fd4.pack
-rw-rw-r-- 1 jameinel bzrusers 561 Oct 22 14:14 916267eb715bcaadf4b026cbe061ac8b.pack
-rw-rw-r-- 1 jameinel bzrusers 735 Oct 22 14:10 c4ca1ce789afb4c8701fba569200647c.pack

So new branches were created with the default group (but I forgot to set the repo to g+s, and only set .bzr/ that way).

bzr+ssh used my default umask to create the branch, which caused it to be g-w, while sftp created it with g+w. Though I have an sftp-wrapper script installed which does:
#!/bin/sh
# Just run sftp-server with the correct umask
umask 0002
exec /usr/libexec/openssh/sftp-server

Anyway, both sftp and bzr+ssh used the right permissions for creating new pack and index files, and the group bits were preserved.

I guess Pack repos don't continually create new directories like Knit repos do, but I'd like a bit more detail as to what is actually failing via bzr+ssh.