Wednesday, August 02, 2017 DJ Maraz
If you do web development or use cloud storage for backups, you may have heard of
Amazon S3 which offers dirt-cheap storage for both private and public use. Data in S3 is split into "buckets", which can be configured individually and may contain folder structures.
Then there's
S3FS (S3 File System) that allows accessing S3 just as easily as local files. The few tutorials I found used /etc/fstab to auto-mount buckets, but that's not very smart on a desktop computer with multiple users, each managing buckets of their own. Besides, editing /etc/fstab can be
very dangerous to newbies. That's why I looked for a way to achieve the same and more without touching any system-wide configuration. The only part that even needs sudo privileges is installing the S3FS package.
If you've used Linux servers or desktops for some time, you've probably heard of
systemd, which allows creating your own background services (daemons) relatively easily. The real beauty about it is that adding user-specific services is equally easy, and in my experience they are more reliable than processes started using the classic "Startup Applications" tool.
I'll walk you through to combine those three building blocks into an automatic service that brings your S3 files right under your home directory on a Linux desktop computer. This should work as-is on any recent Debian, Ubuntu or a derivative operating system, and with some changes on others, too (forget about Windows, though).