Mount an Atomidata S3 bucket on Linux using s3fs
s3fs lets you mount an S3-compatible bucket as a local filesystem. Files appear in a directory just like any local folder — no special S3 client needed.
Prerequisites
1 Install s3fs-fuse
s3fs is available in the package repositories of most Linux distributions.
Ubuntu / Debian
sudo apt update sudo apt install s3fs -y
RHEL / CentOS / Fedora
sudo dnf install epel-release -y sudo dnf install s3fs-fuse -y
Verify the installation:
s3fs --version
2 Store your S3 credentials
s3fs reads credentials from a file. Create /etc/passwd-s3fs for system-wide use, or ~/.passwd-s3fs for your user only.
Replace ACCESS_KEY_ID and SECRET_ACCESS_KEY with the actual credentials from your Atomidata account.
System-wide (root-mounted buckets)
echo "ACCESS_KEY_ID:SECRET_ACCESS_KEY" | sudo tee /etc/passwd-s3fs sudo chmod 600 /etc/passwd-s3fs
Per-user (your home directory)
echo "ACCESS_KEY_ID:SECRET_ACCESS_KEY" > ~/.passwd-s3fs chmod 600 ~/.passwd-s3fs
The chmod 600 step is required. s3fs will refuse to run if the credentials file is world-readable.
3 Mount the bucket
Create a local directory to use as the mount point, then run s3fs pointing to the Atomidata endpoint.
# Create the mount point sudo mkdir -p /mnt/my-bucket # Mount the bucket s3fs my-bucket-name /mnt/my-bucket \ -o url=https://s3.atomidata.fi \ -o use_path_request_style \ -o passwd_file=~/.passwd-s3fs \ -o allow_other
Replace my-bucket-name with your actual bucket name and /mnt/my-bucket with your preferred mount path.
use_path_request_style is required for S3-compatible endpoints like Atomidata that use path-style URLs (https://s3.atomidata.fi/bucket-name) instead of virtual-hosted style.
For allow_other to work, ensure user_allow_other is uncommented in /etc/fuse.conf.
4 Verify the mount
# Check it appears in mount list mount | grep s3fs # List contents ls -la /mnt/my-bucket # Write a test file echo "hello atomidata" > /mnt/my-bucket/test.txt # Read it back cat /mnt/my-bucket/test.txt
5 Auto-mount on boot via /etc/fstab
To make the mount persistent across reboots, add an entry to /etc/fstab.
sudo nano /etc/fstab
Add the following line at the end of the file:
my-bucket-name /mnt/my-bucket fuse.s3fs \ _netdev,allow_other,use_path_request_style,\ url=https://s3.atomidata.fi,\ passwd_file=/etc/passwd-s3fs 0 0
The _netdev flag tells the system to wait for the network to be available before mounting. This prevents boot failures if the system starts before the network is up.
Test the fstab entry without rebooting:
sudo mount -a
Useful mount options
Add these to your s3fs command or fstab entry as needed:
# Enable debug logging (helpful for troubleshooting) -o dbglevel=info -f -o curldbg # Limit parallel requests (reduce load) -o parallel_count=5 # Cache metadata locally -o use_cache=/tmp/s3fs-cache # Set file/dir permissions for new objects -o umask=0022 # Run as a specific uid/gid -o uid=1000,gid=1000 # Mount read-only -o ro
Unmounting
# Standard unmount sudo umount /mnt/my-bucket # Force unmount if busy sudo umount -l /mnt/my-bucket
Troubleshooting
Permission denied on credentials file
chmod 600 ~/.passwd-s3fs
fuse: allow_other failed
# Uncomment user_allow_other in fuse.conf
sudo sed -i 's/#user_allow_other/user_allow_other/' /etc/fuse.conf
403 Forbidden / SignatureDoesNotMatch
Double-check your access key and secret in ~/.passwd-s3fs. Ensure there are no extra spaces or newlines.
Files are not visible / stale listings
# Disable metadata caching for more up-to-date listings
-o stat_cache_expire=1
Enable verbose debug output
s3fs my-bucket-name /mnt/my-bucket \ -o url=https://s3.atomidata.fi \ -o use_path_request_style \ -o passwd_file=~/.passwd-s3fs \ -d -d -f -o f2 -o curldbg
s3fs is a FUSE-based filesystem. Performance is lower than a native filesystem. It works well for bulk file operations, but is not suited for frequent random writes, database files, or applications that rely on file locking.