S3 Drive - Linux Quickstart
S3 Drive is an easy-to-use command line application that mounts S3 buckets and allows you to browse and work with objects as if they were stored on your local machine.
Prerequisites
S3 Drive requires only a few prerequisites to be installed in order to run properly:
- /n software S3 Drive
- Microsoft .NET 6 (or later) Runtime
- FUSE 2 (FUSE 3 Support Coming Soon)
Installing the .NET runtime and FUSE libraries on Linux can typically be done in only a couple of commands. If the commands listed below are not suitable for your environment please refer to the official Microsoft and FUSE documentation for instructions on installing on your system. In most the following commands can be used:
RedHat/CentOS:
sudo yum install dotnet-runtime-6.0
sudo yum install fuse-libs
Debian/Ubuntu:
sudo apt-get install dotnet-runtime-6.0
sudo apt-get install libfuse2
Mounting the Remote File System
Connecting to a server is designed to be simple. The connection details may be provided as command line arguments or via a configuration file. The following command is all that is necessary to mount a drive.
dotnet s3drive.dll start --mount-point /path/to/mount/point --provider amazons3 [--region us-east-1] --bucket test --access-key VALUE --secret-key VALUE
Please note that the local folder must be empty.
Another way to start the drive is to specify the connection details using a configuration file. The installation includes an example s3drive_example.conf file that can be modified for your environment. The following command is all that is necessary to mount a drive via a configuration file.
dotnet s3drive.dll start -c example.conf
For details on additional command-line options and examples please use the help command as in the example below or refer to the "Running S3 Drive" section of the Online Documentation.
dotnet s3drive.dll help
Example Configuration
Below is an example configuration file with the minimal settings needed to mount a drive. Details about possible settings and values can be found in the s3drive_example.conf file that is included with the product.
# The Global section is for system-wide mount point settings.
[Global]
# Logging settings. LogMode can be set to 0 (off) to 5 (debug):
# 0 Off - Nothing will be logged.
# 1 Error - Only errors will be logged.
# 2 Warning - Additional warning information will be logged.
# 3 Info - General information about the status of the connection will be logged.
# 4 Verbose - Logs additional information about the connection and detailed protocol information.
# 5 Debug - Logs detailed debug information, including raw data.
LogFile="/path/to/file.log"
LogMode=4
LogToFile=True
[AppInfo]
Name="S3Drive"
[Drives\ExampleDrive]
# Defines a bucket or object on the server that will serve as
# a root folder of the drive. If needed, a path portion can be
# specified after the bucket name. For example: bucket/path/to/object.
Bucket="bucket"
# MountPoint is the desired location on the local disk where the server's filesystem should be mounted.
MountPoint="/path/to/mount/point"
# Defines the provider and region to use when connecting to the S3 storage provider.
# To use a custom provider, define the URL configuration setting below.
# Valid options are :
# amazons3 (default)
# backblazeb2
# cloudflarer2
# digitalocean
# ibm
# linode
# oracle
# seagatelyvecloud
# wasabi
Provider="amazons3"
Region="us-east-1"
# Defines credentials to connect to the S3 storage provider.
AccessKey="YOUR_ACCESS_KEY"
SecretKey="YOUR_SECRET_KEY"
Once the start command has run successfully, verbose level console output should look something like the following:
[05/09/2023 13:24:19] [TID=001] S3 Drive 22.0.8518
[05/09/2023 13:24:19] [TID=001] Unix 5.15.0.60
[05/09/2023 13:24:19] [TID=001] Driver installed: 2.9.0.0
[05/09/2023 13:24:19] [TID=001] License: [Starter Edition]
[05/09/2023 13:24:19] [TID=001] LogMode: Info
[05/09/2023 13:24:19] [TID=001] Starting S3 service.
[05/09/2023 13:24:19] [TID=001] [INFO ] [drive_name] Mounting drive: 'drive_name'.
[05/09/2023 13:24:19] [TID=001] [INFO ] [drive_name] Start to connect to S3 server
[05/09/2023 13:24:19] [TID=001] [INFO ] [drive_name] Establishing S3 connection to
[05/09/2023 13:24:19] [TID=001] [INFO ] [drive_name] All requests will be sent using signature version 4
[05/09/2023 13:24:19] [TID=001] [INFO ] [drive_name] S3 connection established.
[05/09/2023 13:24:19] [TID=001] [INFO ] [drive_name] Connected to S3 server successfully
[05/09/2023 13:24:24] [TID=013] [INFO ] [drive_name] Successfully added mounting point '/path/to/mount/point'.
[05/09/2023 13:24:24] [TID=001] [INFO ] [drive_name] Mounting complete.
[05/09/2023 13:24:24] [TID=001] The S3 service started successfully.
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at kb@nsoftware.com.