Fixing up nginx file opening permissions

Got this error message on startup of nginx. There are a lot of places you can change this value so it gets a bit confusing. It could be the user that nginx is running under, (usually www-data) or the process, or it could be set in systemd init file or in security/limits.conf … OK, so … Read more

Copy tmux Scroll Buffer to a File

tmux is super handy for long running commands. Especially if you have a dodgy connection which is likely to break: the command will keep running and you can re-attach to the session to save the day. But as a dyed-in-the-wool bash user, I've kinda got used to being able to scroll up and down my … Read more

HEREDOC operators

Basic usage Output alternatives: Can also use >> to append to output file, or | tee to output to screen as it runs. Quoting preserves content If you're outputting a script you might need to preserve the variable notation instead of evaluating it. You can use either single or double quotes to do this. Zapping … Read more

rrsync: a hidden gem

I've been using rsync for decades, and had never come across its cousin rrsync, until a google search put it on my map. I was revisiting the inherent security problem in rsync backups: if you've given ssh access to a server, it can typically do a lot more than just rsync. To limit the damage, … Read more