When a user writes a file it takes on that user's username/group then other users have no permission to it. Is there a way around this issue? Basically I want to create a SSH account for multiple users and have them all write to the same folder which will be the central git repository.
But when one user writes, it just takes on that user's user/group permissions and does not inherit from the parent folder. Is there a way I can just have everything in one folder/subfolder take on a set user/group? Like I don't want each individual folder/file to have it's own broken inheritance I want everything to be based on the root file.
Is there some way of accomplishing this without needing to have scripts that run nightly to reset it?
As a site note, is this the correct way for a new user to init their local environment so they can use my git server? I got the server and my own personal one working a long time ago so just want to make sure I'm doing it right. It SEEMS to be working except for the permission issues. If I manually go change the permissions after a commit then everything seems to work as I expect.
Then they can do git pull etc.
But when one user writes, it just takes on that user's user/group permissions and does not inherit from the parent folder. Is there a way I can just have everything in one folder/subfolder take on a set user/group? Like I don't want each individual folder/file to have it's own broken inheritance I want everything to be based on the root file.
Is there some way of accomplishing this without needing to have scripts that run nightly to reset it?
As a site note, is this the correct way for a new user to init their local environment so they can use my git server? I got the server and my own personal one working a long time ago so just want to make sure I'm doing it right. It SEEMS to be working except for the permission issues. If I manually go change the permissions after a commit then everything seems to work as I expect.
Code:
#create/move to the folder you want to code from:
mkdir app
cd app
#init git environment:
git init
#add repo remote info:
git remote add origin ssh://username@host:22/path/to/repo
#set some global options for this repo:
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
#optional (needed if you never used git before on that system)
git config user.email "youremail@example.com"
git config user.name "Your Name"
Then they can do git pull etc.
Last edited: