How to prevent ssh git push to set file ownership?
Posted
by e-satis
on Server Fault
See other posts from Server Fault
or by e-satis
Published on 2010-04-18T09:48:36Z
Indexed on
2010/04/18
9:54 UTC
Read the original article
Hit count: 441
I have a remote bare git repository on an Ubuntu server, where the file are owned by the user my_project
and the group my_project
, with permissions set accordingly. All commiters are themself in the group my_project
.
When somebody commit then push from my Ubuntu laptop with the user my_user
to the server via SSH, some files in the remote repository are created (updated?) so they now belong to the user and group my_user
.
Of course, when somebody else want to commit, he is now unable to do so because he doesn't have write permissions. I could set permission to 777 but it's not the best option.
Is there any way I can solve this problem while keeping restricted write permissions.
© Server Fault or respective owner