Apache2 reading from sshfs share

Today, I have encountered problems trying to read data from sshfs share in apache2. I was getting 403 Forbidden error. It turned out you need to enable other_user in sshfs, so other users than the one mounting the share can access the data, as apache2 is using www-data user.
# uncomment last line of /etc/fuse.conf
# Allow non-root users to specify the allow_other or allow_root mount options.

# enable other_user and read access by non-root
sudo chmod a+r /etc/fuse.conf

# remount
sudo umount DESTINATION
sshfs -o allow_other SHARE DESTINATION

Inspired by serverfault and unix.stackexchange.


Limit rsync bandwitdh

Especially useful if you share Internet connection with devoted gamers and you prefer to stay safe when they play CS;)
# limit rsync bandwith to 500 KB/s
rsync -avz –bwlimit=500 remoteHost:remoteDir ~/localDir
I have noticed rsync is using double --bwlimit (in this case 1000 KB/s), so if you truly want to limit the bandwidth to 500 KB/s, use --bwlimit=250.

Inspired by HowToGeek.