Disclaimer: I know this question has been asked a lot, i've read a bunch of ways and tried a bunch of ways, but i'm still running into issues, please feel free to refer me to a dupe question if you think it helps.
I have a ubuntu server, and currently use my own user
invisibled and not root. I login to the server with this user and can sudo with this user, but I have to sudo to make any changes to any files, which includes running
git pull. I want to be able to add/edit/delete files in the
/var/www/ folder without having to sudo and type my password. The password prompt specifically is what I want to rid of as it gets in the way of remotely executing
git pull requests.
Can I do something as simple as giving my user full authority over the
/var/www/ folder? Everything in here is in a git repo and can be wiped out if need be.
I'm a web developer by profession and my ubuntu knowledge is just self taught to be able to manage these servers, so i'm not sure what the best, or correct approach is. Any info/tips would be amazing! Let me know if you need any more info.
invisibled www-data so my user is part of the
/var/www/ folder's ownership permissions:
drwxrwsr-x 10 root www-data 4096 Sep 8 15:23 .