[permission] # Readonly mode. Default to be true. readonly = true # Allow execution of binaries. executable = false # Owner user and group id for all files and directories, since OneDrive files don't have UNIX UID or GID. # Default to be UID and GID of the current process. #uid = 1000 #gid = 1000 # The global umask (`umask`) and umask applied to files (`fmask`) and directories (`dmask`). # Default to be the umask of the current process. #umask = 0o022 #fmask = 0o022 #dmask = 0o022 [net] # Global connect timeout in seconds for all requests. connect_timeout = 10 # Global request timeout in seconds for all requests except download and upload. # There is an individual option `vfs.file.download.chunk_timeout` for download stream chunk timeout. request_timeout = 30 [relogin] # Whether to enable auto-relogin. # Normally the token returned is available for 3600 s (1 hour). We need to periodly re-login # to get a new token if need to serve for a long time. # The refresh token returned will be periodly saved to credential file, so keep that file writable. enable = true # Check period in seconds. # We will periodly check current time for whether need re-login, instead of sleep to the target time, # since system time may change and the system may suspend and resume. # This is also the retry delay if a re-login attempt failed. check_period = 60 # Time in seconds before the token expiration to start re-login. # If current time is after the expiration time (returned in login response) minus `time_before_expire`, # it tries to re-login. time_before_expire = 600 # Minimal login cooldown time in seconds. # No re-login will be performed in `min_live_time` after a successful login, even though the condition # of `time_before_expire` reached. min_live_time = 60 [vfs.tracker] # Enable incremental tracking for remote side changes periodically. # Any content or attributes changed on remote side will cause local cache to be updated or invalidated. # If tracking is disabled, we assume that nothing can be changed on remote side once fetched, # otherwise, it will lead to inconsistency. # Note: When this is `false`, initial state will still be fetched during initialization. enable = true # Period in seconds to poll change events. period = 10 # Page size when fetching changes. fetch_page_size = 512 [vfs.statfs] # Whether to enable auto-refresh on statfs information. # If disabled, it will only be fetched in first statfs call and will be kept forever. enable_auto_refresh = true # Refresh period in seconds. refresh_period = 60 [vfs.inode] [vfs.file.disk_cache] # Whether to enable on-disk file cache. Required to support uploading. # Files smaller than `max_cached_file_size` are saved in LRU cache directory on disk. # When they are opened and not removed from cache, a downloading thread is running in background to # download the whole content of the file, though maybe programs only read some bytes of it. # Note that if a file still opened, it will never be removed from LRU cache. enable = true # The cache directory. Default to be `onedrive_fuse-cache` under system temporary directory. #path = "/tmp/onedrive_fuse-cache" # Max file size in cache. Default to be 16 MiB. # Files larger than it will not be cached and can only read as stream. max_cached_file_size = 16777216 # Max file count in cache. max_files = 1024 # Max total file size in cache. Default to be 256 MiB. # This must be not less than `max_cached_file_size`. max_total_size = 268435456 [vfs.file.download] # Max number of chunks the streaming download buffer holds. # Once it's full (when read speed is slower than download speed), downloading is temporary blocked. # Chunks are from low-level connection. A chunk is about 4~16 KiB. stream_buffer_chunks = 256 # The ring buffer for streaming download. Default to be 4 MiB. # Only these bytes behind the maximum downloaded offset will be kept. stream_ring_buffer_size = 4194304 # Max retries to resume download when connection lost before raising error. max_retry = 5 # Delay in seconds between each retry. retry_delay = 5 # The timeout in seconds waiting for one chunk (aka. timeout of zero download speed). # Connection will be aborted and retried if no data received in this period of time. chunk_timeout = 20 [vfs.file.upload] # Max file size of a file open in write mode. Default to be 2 MiB. # This should be smaller than `vfs.disk_cache.max_cached_file_size` since the write mode requires # the file to be in disk cache. max_size = 2097152 # Delay between write call and actual uploading. # Multiple writes on a single file within this duration will only be uploaded once. flush_delay = 5 # Delay in seconds between each retry. retry_delay = 5