I very often need to upload some kind of file to a server, to put some application directory somewhere. Since my user account is of course unprivileged, I generally have to do this:
scp file.txt myserver: ssh myserver $ sudo cp file.txt /etc/app/config $ sudo chown app:app /etc/app/config/file.txt
I didn't go through sysadmin school, so I'm just wondering if I missed something. Is there a better way? What do other people do?
- Write local scripts for this kind of task?
- Add your user account to the same group as every application, and hope that group perms are enough?
- Log in as root?
- Make app accounts login-able?