I'm looking to git pull from my Ec2 instance without having to sudo. Are there any security concerns with changing the default read/write/execute permissions of .git/FETCH_HEAD or any other file in .git?
In my Ec2 instance, I've created different users that would be able to login to the Ec2 and git pull without having to sudo. I was thinking I could just add the users to a www-data group (I add the www-data user to admin group which has sudo access) so they could pull without having to sudo. All the files in my project are owned by the www-data user and the www-data group. Would that make sense or what would be a good way to do this securely?
-rw-r--r-- 1 www-data www-data 0 Mar 11 19:53 FETCH_HEAD
doing git pull would give me
error: cannot open .git/FETCH_HEAD: Permission denied
Guessing because I don't have execute permissions?