Repository permission problem
I use Gitblit GO on a Ubuntu server to allow https access to the repositories additionally to the previous ssh access without Gitblit. The repository is setup as shared but the files in
Steps to reproduce:
- create repository with git init --bare --shared=0660 (I've done it via ssh but git.createRepositoriesShared=0660 is set too)
- clone with https over gitblit
- push changes
- /logs/refs/heads/master has 644 permission with owner gitblit and group git instead of 660
- clone with another user in git group. f.e. git via ssh (without Gitblit)
- push changes
- error because /logs/refs/heads/master is not writable for group
Any ideas how to solve this (preferably without changing default umask)? Thanks in advance
Excellent question. I am not sure why that is. One thing contributing could be that on Ubuntu normal users have a umask of 0002, while the Gitblit service, which probably was started in a system context, will have umask 0022. But I just tested and disabled USERGROUPS_ENAB, logged in via SSH and verified that the umask was 0022. Nevertheless a push via Ssh resulted in 0660.
But why set the default umask? It should be enough to set the umask of the Gitblit process to 0002. For example in the gitblit.sh script or the init script or however it is started.