S3FS(1)
๐ธ S3FS โ User Commands, section 1
okay bestie, buckle UP, because S3FS is a whole vibe and we're doing this properly. it's in section 1 of the manual (User Commands, iykyk), and no cap, this thing is long, so we're taking it in pieces. this is piece one. hydrate. ๐
โจ NAME โจ
S3FS โ a FUSE-based file system backed by Amazon S3. that's it. that's the name section. iconic minimalism, honestly. ๐ซถ
๐ SYNOPSIS ๐
๐ mounting
s3fs bucket[:/path] mountpoint [options]
s3fs mountpoint [options (must specify bucket= option)]
๐ฆ unmounting
umount mountpoint
For root. ๐
fusermount -u mountpoint
For unprivileged user.
๐ utility mode (remove interrupted multipart uploading objects)
s3fs --incomplete-mpu-list (-u) bucket
s3fs --incomplete-mpu-abort[=all | =<expire date format>] bucket
๐ DESCRIPTION ๐
so, s3fs is a FUSE filesystem that lets you mount an Amazon S3 bucket as a local filesystem. it stores files natively and transparently in S3, which means โ and this is the slay part โ you can use other programs to access the same files. the files are just... there. on S3. being normal. โจ
๐ AUTHENTICATION ๐
s3fs supports the standard AWS credentials file, which lives here: https://docs.aws.amazon.com/cli/latest/userguide/cli-config-files.html โ and it's stored in ${HOME}/.aws/credentials. ๐
or, if you want a custom passwd file, s3fs supports that too. but heads up: only the AWS credentials file format can be used when an AWS session token is required. no exceptions, bestie, it's giving strict.
the s3fs password file has this format โ use this one if you've only got one set of credentials:
accessKeyId:secretAccessKey
if you have more than one set of credentials, this syntax is also recognized:
bucketName:accessKeyId:secretAccessKey
password files can be stored in two locations:
/etc/passwd-s3fsโ[0640]$HOME/.passwd-s3fsโ[0600]
s3fs also recognizes the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables. ๐ซถ
๐ OPTIONS ๐
๐ง general options
-h,--helpโ print help. the "help me please" button.--versionโ print version. the "what era are we in" button.-fโ FUSE foreground option โ do not run as a daemon. it stays right there with you, in your terminal, watching. ๐-sโ FUSE single-threaded option. this disables multi-threaded operation, so everything happens one at a time, like a very patient queen.
๐ธ mount options
all s3fs options must be given in the form where "opt" is:
<option_name>=<option_value>
-o bucketโ if it is not specified bucket name (and path) in command line, you must specify this option after the-ooption for the bucket name.-o default_acl(default="private") โ the default canned acl to apply to all written s3 objects, e.g.,"private","public-read". for the full list of canned ACLs, go seehttps://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl. ๐-o retries(default="5") โ number of times to retry a failed S3 transaction. it's persistent. it's trying. we respect it.-o tmpdir(default="/tmp") โ local folder for temporary files. the little waiting room. ๐ช-o use_cache(default=""which means disabled) โ local folder to use for local file cache.-o check_cache_dir_exist(default is disable) โ ifuse_cacheis set, check if the cache directory exists. if this option is not specified, the directory will be created at runtime when the cache directory does not exist. it's flexible like that. โจ-o del_cacheโ delete local file cache. it deletes the local file cache when s3fs starts and exits. bye cache, love u, mean it. ๐-o storage_class(default="standard") โ store object with specified storage class. possible values:standard,standard_ia,onezone_ia,reduced_redundancy,intelligent_tiering,glacier,glacier_ir, anddeep_archive. pick your fighter. ๐ฅ-o use_rrs(default is disable) โ use Amazon's Reduced Redundancy Storage. this option can not be specified withuse_sse. (can specifyuse_rrs=1for old version.) this option has been replaced by the newstorage_classoption, so it's giving legacy, but we still document it because that's the assignment.-o use_sse(default is disable) โ okay this one is a whole saga, sit down. ๐ฟ
it specifies three types of Amazon's Server-Site Encryption: SSE-S3, SSE-C or SSE-KMS. SSE-S3 uses Amazon S3-managed encryption keys, SSE-C uses customer-provided encryption keys, and SSE-KMS uses the master key which you manage in AWS KMS.
you can specify "use_sse" or "use_sse=1" and that enables the SSE-S3 type (use_sse=1 is the old type parameter).
for setting SSE-C, you can specify "use_sse=custom", "use_sse=custom:<custom key file path>" or "use_sse=<custom key file path>" (only <custom key file path> specified is the old type parameter). you can use "c" as the short form of "custom".
the custom key file must be 600 permission. the file can have some lines, each line is one SSE-C key. the first line in the file is used as Customer-Provided Encryption Keys for uploading and changing headers etc. if there are some keys after the first line, those are used for downloading objects which are encrypted by a not-first key. so that, you can keep all SSE-C keys in the file โ that's the SSE-C key history, bestie, it's a scrapbook of keys. ๐
if you specify "custom" ("c") without a file path, you need to set the custom key by the load_sse_c option or the AWSSSECKEYS environment. (AWSSSECKEYS environment has some SSE-C keys with ":" separator.)
this option is used to decide the SSE type. so that if you do not want to encrypt an object at uploading, but you need to decrypt an encrypted object at downloading, you can use the load_sse_c option instead of this option. ๐ก
for setting SSE-KMS, specify "use_sse=kmsid" or "use_sse=kmsid:<kms id>". you can use "k" as the short form of "kmsid". if you can specify the SSE-KMS type with your <kms id> in AWS KMS, you can set it after "kmsid:" (or "k:"). if you specify only "kmsid" ("k"), you need to set the AWSSSEKMSID environment, whose value is <kms id>.
โ ๏ธ you must be careful about the fact that you can not use a KMS id which is not in the same EC2 region. and additionally, if you specify SSE-KMS, your endpoints must use Secure Sockets Layer (SSL) or Transport Layer Security (TLS). no shortcuts, no vibes-only networking. ๐
-o load_sse_cโ specify SSE-C keys. this specifies the custom-provided encryption keys file path for decrypting at downloading. if you use the custom-provided encryption key at uploading, you specify it with"use_sse=custom". the file has many lines, one line means one custom key. so that you can keep all SSE-C keys in the file โ again, that's the SSE-C key history. theAWSSSECKEYSenvironment is the same as this file's contents. ๐-o passwd_file(default="") โ specify the path to the password file, which takes precedence over the password in$HOME/.passwd-s3fsand/etc/passwd-s3fs. it's the main character of password sources, basically. ๐-o ahbe_conf(default=""which means disabled) โ this option specifies the configuration file path, which file is the additional HTTP header by file (object) extension. the configuration file format is below:
line = [file suffix or regex] HTTP-header [HTTP-values]
file suffix = file (object) suffix, if this field is empty, it means "reg:(.*)".(=all object).
regex = regular expression to match the file (object) path. this type starts with "reg:" prefix.
HTTP-header = additional HTTP header name
HTTP-values = additional HTTP header value
sample:
.gz Content-Encoding gzip
.Z Content-Encoding compress
reg:^/MYDIR/(.*)[.]t2$ Content-Encoding text2
a sample configuration file is uploaded in the "test" directory. if you specify this option to set the "Content-Encoding" HTTP header, please take care for RFC 2616. ๐
-o profile(default="default") โ choose a profile from${HOME}/.aws/credentialsto authenticate against S3. note: this format matches the AWS CLI format and differs from the s3fs passwd format. don't mix them up, bestie, it's not the same language. ๐ฃ๏ธ-o public_bucket(default=""which means disabled) โ anonymously mount a public bucket when set to1. this ignores the$HOME/.passwd-s3fsand/etc/passwd-s3fsfiles. S3 does not allow copy object api for anonymous users, so s3fs sets thenocopyapioption automatically when thepublic_bucket=1option is specified. automatic. seamless. slay. โจ-o connect_timeout(default="300"seconds) โ time to wait for connection before giving up. it waits. then it gives up. respect the timeline.-o readwrite_timeout(default="120"seconds) โ time to wait between read/write activity before giving up. same energy, different activity. ๐ฆ-o list_object_max_keys(default="1000") โ specify the maximum number of keys returned by the S3 list object API. the default is1000. you can set this value to1000or more.-o max_stat_cache_size(default="100,000"entries (about 40MB)) โ maximum number of entries in the stat cache and symbolic link cache. that's a lot of entries. it's a big cache. it's eating. ๐ฝ๏ธ-o stat_cache_expire(default is900) โ specify expire time (seconds) for entries in the stat cache and symbolic link cache. this expire time indicates the time since cached.-o stat_cache_interval_expire(default is900) โ specify expire time (seconds) for entries in the stat cache and symbolic link cache. this expire time is based on the time from the last access time of those caches. this option is exclusive withstat_cache_expire, and is left for compatibility with older versions. old but not forgotten. ๐ฏ๏ธ-o enable_negative_cache(default is enabled negative cache) โ this option will keep non-existence of objects in a stat cache. when this negative cache is enabled, it will not process extraHeadObjectrequests to search for non-existent objects, improving performance. this feature is enabled by default, so there is no need to specify it. it's already on, bestie, you're already living the dream. ๐-o disable_negative_cache(default is enabled negative cache) โ by default, s3fs keeps non-existent objects in the stat cache. this option disables this negative caching. this prevents delays in updates due to cache retention. however โ and this is the tradeoff, listen โ it may increase the number ofHeadObjectrequests to check if an object exists, which may decrease performance. pick your struggle. ๐-o no_check_certificate(by default this option is disabled) โ server certificate won't be checked against the available certificate authorities. the certificate just... doesn't get checked. you've been warned, that's the whole warning. ๐จ-o ssl_verify_hostname(default="2") โ when0, do not verify the SSL certificate against the hostname.-o ssl_client_cert(default="") โ specify an SSL client certificate. specify this optional parameter in the following format:
"<SSL Cert>[:<Cert Type>[:<Private Key>[:<Key Type>
[:<Password>]]]]"
<SSL Cert>: Client certificate.
Specify the file path or NickName(for NSS, etc.).
<Cert Type>: Type of certificate, default is "PEM"(optional).
<Private Key>: Certificate's private key file(optional).
<Key Type>: Type of private key, default is "PEM"(optional).
<Password>: Passphrase of the private key(optional). It is also
possible to omit this value and specify it using the environment
variable "S3FS_SSL_PRIVKEY_PASSWORD".
okay so that's the setup, the auth, and the entire general + mount option lineup so far โ and bestie, there is so much more where that came from. ๐ keep scrolling, we're not even close to done. ๐ซถ
-o nodnscacheโ okay so bestie, this disables the DNS cache. s3fs is always using DNS cache, and this option makes DNS cache disabled. periodt ๐-o nosscacheโ this disables SSL session cache. s3fs is always using SSL session cache, and this option makes SSL session cache disabled. ๐ฆ-o multipart_sizeโ default"10". Part size, in MB, for each multipart request. The minimum value is 5 MB and the maximum value is 5 GB. โจ-o multipart_copy_sizeโ default"512". Part size, in MB, for each multipart copy request, used for renames and mixupload. The minimum value is 5 MB and the maximum value is 5 GB. Must be at least 512 MB to copy the maximum 5 TB object size but lower values may improve performance. ๐-o max_dirty_dataโ default"5120". Flush dirty data to S3 after a certain number of MB written. The minimum value is 50 MB. A-1value means disable. Cannot be used withnomixupload. โ ๏ธ-o bucket_sizeโ default is maximum long unsigned integer value. The size of the bucket with which the corresponding elements of thestatvfsstructure will be filled. The option argument is an integer optionally followed by a multiplicative suffix (GB,GiB,TB,TiB,PB,PiB,EB,EiB) (no spaces in between). If no suffix is supplied, bytes are assumed; eg:20000000,30GB,45TiB. Note that s3fs does not compute the actual volume size (too expensive): by default it will assume the maximum possible size; however, since this may confuse other software which uses s3fs, the advertised bucket size can be set with this option. iconic ๐-o ensure_diskfreeโ default0. Sets MB to ensure disk free space. This option means the threshold of free space size on disk which is used for the cache file by s3fs. s3fs makes file for downloading, uploading and caching files. If the disk free space is smaller than this value, s3fs do not use disk space as possible in exchange for the performance. ๐ก๏ธ-o free_space_ratioโ default"10". Sets min free space ratio of the disk. The value of this option can be between0and100. It will control the size of the cache according to this ratio to ensure that the idle ratio of the disk is greater than this value. For example, when the disk space is50GB, the default value will ensure that the disk will reserve at least50GB * 10%% = 5GBof remaining space. ๐-o multipart_thresholdโ default"25". Threshold, in MB, to use multipart upload instead of single-part. Must be at least 5 MB. ๐ฅ-o singlepart_copy_limitโ default"512". Maximum size, in MB, of a single-part copy before trying multipart copy. ๐-o hostโ default"https://s3.amazonaws.com". Set a non-Amazon host, e.g.,https://example.com. ๐-o servicepathโ default"/". Set a service path when the non-Amazon host requires a prefix. ๐ค๏ธ-o urlโ default"https://s3.amazonaws.com". Sets the url to use to access Amazon S3. If you want to use HTTP, then you can set"url=http://s3.amazonaws.com". If you do not use https, please specify the URL with theurloption. ๐-o regionโ default"us-east-1". Sets the region to use on signature version 4. If this option is not specified, s3fs uses"us-east-1"region as the default. If the s3fs could not connect to the region specified by this option, s3fs could not run. But if you do not specify this option, and if you can not connect with the default region, s3fs will retry to automatically connect to the other region. So s3fs can know the correct region name, because s3fs can find it in an error from the S3 server. You can also specify the legacy-o endpointwhich means the same thing. ๐-o sigv2โ default is signature version 4 falling back to version 2. Sets signing AWS requests by using only signature version 2. โ๏ธ-o sigv4โ default is signature version 4 falling back to version 2. Sets signing AWS requests by using only signature version 4. โ๏ธ-o mp_umaskโ default is"0000". Sets umask for the mount point directory. Ifallow_otheroption is not set, s3fs allows access to the mount point only to the owner. In the opposite case s3fs allows access to all users as the default. But if you set theallow_otherwith this option, you can control the permissions of the mount point by this option like umask. ๐-o umaskโ default is"0000". Sets umask for files under the mountpoint. This can allow users other than the mounting user to read and write to files that they did not create. ๐-o nomultipartโ disable multipart uploads. ๐ซ-o streamuploadโ default is disable. Enable stream upload. If this option is enabled, a sequential upload will be performed in parallel with the write from the part that has been written during a multipart upload. This is expected to give better performance than other upload functions. Note that this option is still experimental and may change in the future. โ ๏ธ-o max_thread_countโ default is"10". This value is the maximum number of parallel requests to be sent, and the number of parallel processes for head requests, multipart uploads and stream uploads. Worker threads will be started to process requests according to this value. ๐งต-o enable_content_md5โ default is disable. Allow S3 server to check data integrity of uploads via theContent-MD5header. This can add CPU overhead to transfers. ๐งฎ-o enable_unsigned_payloadโ default is disable. Do not calculateContent-SHA256forPutObjectandUploadPartpayloads. This can reduce CPU overhead to transfers. ๐งฎ-o ecsโ default is disable. This option instructs s3fs to query the ECS container credential metadata address instead of the instance metadata address. ๐ณ-o iam_roleโ default is no IAM role. This option requires the IAM role name or"auto". If you specify"auto", s3fs will automatically use the IAM role names that are set to an instance. If you specify this option without any argument, it is the same as that you have specified the"auto". ๐-o imdsv1onlyโ default is to use IMDSv2 with fallback to v1. AWS instance metadata service, used with IAM role authentication, supports the use of an API token. If you're using an IAM role in an environment that does not support IMDSv2, setting this flag will skip retrieval and usage of the API token when retrieving IAM credentials. ๐-o ibm_iam_authโ default is not using IBM IAM authentication. This option instructs s3fs to use IBM IAM authentication. In this mode, theAWSAccessKeyandAWSSecretKeywill be used as IBM'sService-Instance-IDandAPIKey, respectively. ๐-o ibm_iam_endpointโ default ishttps://iam.cloud.ibm.com. Sets the URL to use for IBM IAM authentication. ๐-o credlibโ default= (empty). Specifies the shared library that handles the credentials containing the authentication token. If this option is specified, the specified credential and token processing provided by the shared library ant will be performed instead of the built-in credential processing. This option cannot be specified withpasswd_file,profile,use_session_token,ecs,ibm_iam_auth,ibm_iam_endpoint,imdsv1onlyandiam_roleoption. ๐-o credlib_optsโ default= (empty). Specifies the options to pass when the shared library specified incredlibis loaded and then initialized. For the string specified in this option, specify the string defined by the shared library. ๐-o use_xattrโ default is not handling the extended attribute. Enable to handle the extended attribute (xattrs). If you set this option, you can use the extended attribute. For example,encfsandecryptfsneed to support the extended attribute. Notice: if s3fs handles the extended attribute, s3fs can not work to copy command withpreserve=mode. ๐ท๏ธ-o noxmlnsโ disable registering xml name space. Disable registering xml name space for response ofListBucketResultandListVersionsResultetc. Default name space is looked up from"http://s3.amazonaws.com/doc/2006-03-01". This option should not be specified now, because s3fs looks upxmlnsautomatically after v1.66. โ ๏ธ-o nomixuploadโ disable copy in multipart uploads. Disable to usePUT(copy api) when multipart uploading large size objects. By default, when doing multipart upload, the range of unchanged data will usePUT(copy api) whenever possible. Whennocopyapiornorenameapiis specified, use ofPUT(copy api) is invalidated even if this option is not specified. ๐ซ-o nocopyapiโ for other incomplete compatibility object storage. For a distributed object storage which is compatibility S3 API withoutPUT(copy api). If you set this option, s3fs do not usePUTwith"x-amz-copy-source"(copy api). Because traffic is increased 2-3 times by this option, we do not recommend this. โ ๏ธ-o norenameapiโ for other incomplete compatibility object storage. For a distributed object storage which is compatibility S3 API withoutPUT(copy api). This option is a subset ofnocopyapioption. Thenocopyapioption does not use copy-api for all command (ex.chmod,chown,touch,mv, etc), but this option does not use copy-api for only rename command (ex.mv). If this option is specified withnocopyapi, then s3fs ignores it. โ ๏ธ-o use_path_request_styleโ (use legacy API calling style). Enable compatibility with S3-like APIs which do not support the virtual-host request style, by using the older path request style. ๐ค๏ธ-o listobjectsv2โ (useListObjectsV2). IssueListObjectsV2instead ofListObjects, useful on object stores withoutListObjectssupport. ๐-o nouaโ (suppress User-Agent header). Usually s3fs outputs of the User-Agent in"s3fs/<version> (commit hash <hash>; <using ssl library name>)"format. If this option is specified, s3fs suppresses the output of the User-Agent. ๐-o cipher_suitesโ Customize the list of TLS cipher suites. Expects a colon separated list of cipher suite names. A list of available cipher suites, depending on your TLS engine, can be found on the CURL library documentation:https://curl.haxx.se/docs/ssl-ciphers.html๐-o instance_nameโ the instance name of the s3fs mountpoint you've got going right now โจ This lil name gets tacked onto logging messages and the user agent headers s3fs sends out. Branding, but make it filesystem ๐-o complement_stat(complement lack of file/directory mode) โ so if a file or directory object is missing itsx-amz-meta-modeheader, this makes s3fs fill in the blanks about file/directory mode ๐ซถ By default s3fs does not complement stat info for an object, which means that object won't be able to be allowed to list/modify. Yeah. Default = sad object, no listing for you ๐ญ-o compat_dir(enable support of alternative directory names) โ okay so by default s3fs speaks two different naming schemas to map directory names to S3 objects and back:"dir/"and"dir"๐ธ As a third variant, directories can be figured out indirectly if there's a file object with a path (like"/dir/file") but no parent directory. And this option unlocks a fourth variant,"dir_$folder$", which is what the old-school applications used to make ๐
Heads up tho: s3fs only ever uses the first schema, "dir/", to create S3 objects for directories.
Supporting all these naming schemas costs extra communication effort โ more chatter, more work, no cap ๐ก
And here's the scenario where it saves you: if you don't have access permissions to the bucket and you specify a directory path created by a client that isn't s3fs as the mount point, you cannot start because s3fs can't find the mount point directory ๐ But specify this option and boom, error avoided โจ
-o use_wtf8โ support arbitrary file system encoding. S3 requires all object names to be valid UTF-8, periodt. But some clients โ notably Windows NFS clients โ use their own encoding ๐ This option re-encodes invalid UTF-8 object names into valid UTF-8 by mapping the offending codes into a 'private' codepage of the Unicode set. Useful on clients that aren't using UTF-8 as their file system encoding ๐-o use_session_tokenโ indicate that a session token should be provided. If your credentials come from environment variables, this switch forces a presence check on theAWS_SESSION_TOKENvariable. Otherwise? An error gets returned, bestie ๐จ-o requester_pays(default is disable) โ tells s3fs to enable requests involving Requester Pays buckets. It includes the'x-amz-request-payer=requester'entry in the request header ๐งพ-o mime(default is"/etc/mime.types") โ specify the path of the mime.types file. If you don't set this option, s3fs checks whether"/etc/mime.types"exists and loads that file as the mime information. And if that file doesn't exist on macOS, then"/etc/apache2/mime.types"gets checked as well ๐-o proxy(default="") โ specify a proxy to the S3 server ๐ฐ๏ธ Format it like'[<scheme://]hostname(fqdn)[:<port>]'. The':<port>'part can also be omitted โ and if you omit it, port 443 is used for HTTPS schema, and port 1080 is used otherwise. This option is the same as the curl command's'--proxy(-x)'option and libcurl's'CURLOPT_PROXY'flag. It's equivalent to โ and takes precedence over โ the environment variables'http_proxy','all_proxy', etc. ๐-o proxy_cred_file(default="") โ this one specifies the file that describes the username and passphrase for authenticating the proxy when the HTTP schema proxy is specified by the'proxy'option ๐ Username and passphrase are valid only for HTTP schema. If the HTTP proxy doesn't require authentication, you don't need this option at all. Separate the username and passphrase with a':'character, and specify each as a URL-encoded string โจ-o ipresolve(default="whatever") โ choose what type of IP addresses get used when establishing a connection ๐ The default ('whatever') can use addresses of all IP versions (IPv4 and IPv6) that your system allows. Specify'IPv4'and only IPv4 addresses are used. Specify'IPv6'and only IPv6 addresses will be used. Simple as that ๐-o logfileโ specify the log output file. s3fs outputs the log file to syslog ๐ Alternatively, if s3fs is started with the"-f"option specified, the log goes to stdout/stderr. This option lets you pick the log file s3fs writes to. And if you specify a log file with this option, it will reopen the log file when s3fs receives aSIGHUPsignal โ so you can useSIGHUPfor log rotation ๐-o dbglevel(default="crit") โ set the debug message level. Set the value ascrit(critical),err(error),warn(warning),info(information) to debug level. Default debug level is critical. If s3fs runs with the"-d"option, the debug level is set to information. And when s3fs catches the signalSIGUSR2, the debug level gets bumped up ๐-o curldbgโ put curl debug message. This dumps the debug message from libcurl when specified ๐ Give it"normal"or"body"for the parameter. Omit the parameter and it's the same as"normal". Specify"body"and some API communication body data will be output in addition to the debug message output you'd get as"normal"๐ซง-o no_time_stamp_msgโ no time stamp in debug message. By default the time stamp is output to the debug message. Specify this option and the time stamp won't be output in the debug message anymore โฐ It's the same even if the environment variable"S3FS_MSGTIMESTAMP"is set to"no".-o set_check_cache_sigusr1(default is stdout) โ if the cache is enabled, you can check the integrity of the cache file and the cache file's stats info file ๐ Specify this option, and when you send theSIGUSR1signal to the s3fs process it checks the cache status at that time. This option can take a file path as a parameter to output the check result to that file ๐ The file path parameter can be omitted โ if omitted, the result goes to stdout or syslog โจ-o update_parent_dir_stat(default is disable) โ the parent directory's mtime and ctime get updated when a file or directory is created or deleted (basically when the parent directory's inode is updated) ๐ธ By default, parent directory statistics are not updated. Just so you know ๐
๐ ๏ธ utility mode options ๐ ๏ธ
-uor--incomplete-mpu-listโ lists multipart incomplete objects uploaded to the specified bucket ๐--incomplete-mpu-abortall or date format (default="24H") โ delete the multipart incomplete objects uploaded to the specified bucket ๐๏ธ If"all"is specified for this option, all multipart incomplete objects will be deleted. If you specify no argument as an option, objects older than 24 hours (24H) will be deleted (that's the default value). You can specify an optional date format โ it can be given as year, month, day, hour, minute, second, expressed as"Y","M","D","h","m","s"respectively. For example,"1Y6M10D12h30m30s"โณ
๐ฆ FUSE/MOUNT OPTIONS ๐ฆ
Most of the generic mount options described in 'man mount' are supported, bestie: ro, rw, suid, nosuid, dev, nodev, exec, noexec, atime, noatime, sync, async, dirsync ๐
Filesystems are mounted with '-onodev,nosuid' by default, and that can only be overridden by a privileged user ๐ (so like, know your power level before you try it).
There are many FUSE specific mount options that can be specified โ e.g. allow_other โจ See the FUSE README for the full set ๐
๐ SERVER URL/REQUEST STYLE ๐
Be careful when specifying the server endpoint (URL). This is not a drill ๐
If your bucket name contains dots ("."), you should use the path request style (using the "use_path_request_style" option) ๐ฅ
Also, if you're using a server other than Amazon S3, you need to specify the endpoint with the "url" option. And at that time, depending on the server you're using, you may have to specify the path request style ("use_path_request_style" option) ๐ฐ๏ธ
๐พ LOCAL STORAGE CONSUMPTION ๐พ
s3fs requires local caching for operation, fr fr. You can enable a local cache with "-o use_cache", or s3fs uses temporary files to cache pending requests to S3 ๐ฆ
Apart from the requirements discussed below, it's recommended to keep enough cache resp. temporary storage to allow one copy each of all files open for reading and writing at any one time ๐
๐ธ Local cache with "-o use_cache" ๐ธ
s3fs automatically maintains a local cache of files ๐ The cache folder is specified by the parameter of "-o use_cache". It's only a local cache โ it can be deleted at any time, and s3fs will rebuild it if necessary. Iconic behaviour, honestly โจ
Whenever s3fs needs to read or write a file on S3, it first creates the file in the cache directory and operates on it ๐ซถ
The amount of local cache storage used can be indirectly controlled with "-o ensure_diskfree" ๐
๐ฆ Without local cache ๐ฆ
Since s3fs always requires some storage space for operation, it creates temporary files to store incoming write requests until the required S3 request size is reached and the segment has been uploaded ๐ค After that, this data is truncated in the temporary file to free up storage space ๐งน
Per file you need at least twice the part size (default 5MB or "-o multipart_size") for writing multipart requests, or space for the whole file if single requests are enabled ("-o nomultipart") ๐
๐ PERFORMANCE CONSIDERATIONS ๐
okay bestie, this section is all about making s3fs go fast. zoom zoom. ๐๏ธโจ
so like, in most cases the backend performance is literally not something you can control, so we're not even gonna talk about it here. not our problem, not our section. ๐
and if you wanna know the tea about local storage usage, that's over in "LOCAL STORAGE CONSUMPTION" โ go check it out.
๐ฅ CPU and Memory Consumption ๐ฅ
s3fs is a multi-threaded application, periodt. depending on the workload it might use up multiple CPUs and a whole bunch of memory. you can keep an eye on all of that CPU and memory consumption with the top utility. she's old, she's reliable, she's watching. ๐
โจ Performance of S3 requests โจ
s3fs ships with several options (like the max_thread_count option, for example) that control behaviour and therefore indirectly control performance. but here's the thing โ the possible combos of these options together with all the different S3 backends are so varied that there's genuinely no individual recommendation other than just... the default values. if you want better settings that are tuned to you, you gotta test and measure. that's the vibe check. ๐
now, these two options โ "Enable negative cache" (-o enable_negative_cache) and "Disable support of alternative directory names" (-o notsup_compat_dir) โ can be used to control shared access to the same bucket by different applications. let's get into it:
- Enable negative cache (
-o enable_negative_cache) โ if a bucket is used exclusively by one s3fs instance, you can turn on the cache for non-existent files and directories with-o enable_negative_cache. this kills the repeated requests that check whether an object exists, which saves you time and possibly money. ate. ๐ธ - Enable support of alternative directory names (
-o compat_dir) โ s3fs recognizesdir/objects as directories. but clients that aren't s3fs might usedirordir_$folder$objects as directories, or the directory objects might not exist at all. so for s3fs to recognize those as directories too, you can specify thecompat_diroption. - Completion of file and directory information (
-o complement_stat) โ s3fs uses thex-amz-meta-mode headerto figure out if an object is a file or a directory. which means objects that don't have thatx-amz-meta-mode headermay not give you the results you expect (like, the directory just won't display, etc. ๐ญ). by specifying thecomplement_statoption, s3fs can automatically complete this missing attribute information, and then you get the expected results. slay.
๐ฆ NOTES ๐ฆ
the maximum size of objects that s3fs can handle depends on Amazon S3, bestie. for example, up to 5 GB when using the single PUT API. and up to 5 TB is supported when the Multipart Upload API is used. big files, big energy. ๐ช
s3fs leverages /etc/mime.types to "guess" the "correct" content-type based on the file name extension. which means you can literally copy a website to S3 and serve it up directly from S3 with correct content-types! iconic behaviour, no cap. ๐
๐ SEE ALSO ๐
fuse(8), mount(8), fusermount(1), fstab(5)
๐ BUGS ๐
okay so this one's important, listen up. due to S3's "eventual consistency" limitations, file creation can and will occasionally fail. and even after a successful create, subsequent reads can fail for an indeterminate time โ even after one or more successful reads. create and read enough files and you will eventually encounter this failure. ๐ญ
this is not a flaw in s3fs, and it's not something a FUSE wrapper like s3fs can work around. the retries option does not address this issue. nope. nada.
so your application has to either tolerate these failures or compensate for them โ for example, by retrying creates or reads. that's on you, bestie. ๐ซถ
๐ AUTHOR ๐
s3fs has been written by Randy Rizun <rrizun@gmail.com>. thank you for your service, king. ๐ซก๐
aaand that's a wrap on the whole page! ๐ this edition is from the s3fs fam, version vibes dated December 2025, and it's the S3FS(1) manual page โ now go mount something gorgeous. bye bestie! ๐
โจ๐ธ
๐ฆ where this page comes from
- alpine 3.24: s3fs-fuse-doc 1.97-r0 ยท GPL-2.0-only
- epel 10: s3fs-fuse 1.97-1.el10_2 ยท GPL-2.0-or-later
- epel 9: s3fs-fuse 1.97-1.el9 ยท GPL-2.0-or-later
- fedora 43: s3fs-fuse 1.97-1.fc43 ยท GPL-2.0-or-later
- fedora 44: s3fs-fuse 1.97-1.fc44 ยท GPL-2.0-or-later
- ubuntu stonking: s3fs 1.97-0.1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms