github.com/artpar/rclone@v1.67.3/docs/content/commands/rclone_nfsmount.md (about)

     1  ---
     2  title: "rclone nfsmount"
     3  description: "Mount the remote as file system on a mountpoint."
     4  slug: rclone_nfsmount
     5  url: /commands/rclone_nfsmount/
     6  groups: Filter
     7  status: Experimental
     8  versionIntroduced: v1.65
     9  # autogenerated - DO NOT EDIT, instead edit the source code in cmd/nfsmount/ and as part of making a release run "make commanddocs"
    10  ---
    11  # rclone nfsmount
    12  
    13  Mount the remote as file system on a mountpoint.
    14  
    15  ## Synopsis
    16  
    17  rclone nfsmount allows Linux, FreeBSD, macOS and Windows to
    18  mount any of Rclone's cloud storage systems as a file system with
    19  FUSE.
    20  
    21  First set up your remote using `rclone config`.  Check it works with `rclone ls` etc.
    22  
    23  On Linux and macOS, you can run mount in either foreground or background (aka
    24  daemon) mode. Mount runs in foreground mode by default. Use the `--daemon` flag
    25  to force background mode. On Windows you can run mount in foreground only,
    26  the flag is ignored.
    27  
    28  In background mode rclone acts as a generic Unix mount program: the main
    29  program starts, spawns background rclone process to setup and maintain the
    30  mount, waits until success or timeout and exits with appropriate code
    31  (killing the child process if it fails).
    32  
    33  On Linux/macOS/FreeBSD start the mount like this, where `/path/to/local/mount`
    34  is an **empty** **existing** directory:
    35  
    36      rclone nfsmount remote:path/to/files /path/to/local/mount
    37  
    38  On Windows you can start a mount in different ways. See [below](#mounting-modes-on-windows)
    39  for details. If foreground mount is used interactively from a console window,
    40  rclone will serve the mount and occupy the console so another window should be
    41  used to work with the mount until rclone is interrupted e.g. by pressing Ctrl-C.
    42  
    43  The following examples will mount to an automatically assigned drive,
    44  to specific drive letter `X:`, to path `C:\path\parent\mount`
    45  (where parent directory or drive must exist, and mount must **not** exist,
    46  and is not supported when [mounting as a network drive](#mounting-modes-on-windows)), and
    47  the last example will mount as network share `\\cloud\remote` and map it to an
    48  automatically assigned drive:
    49  
    50      rclone nfsmount remote:path/to/files *
    51      rclone nfsmount remote:path/to/files X:
    52      rclone nfsmount remote:path/to/files C:\path\parent\mount
    53      rclone nfsmount remote:path/to/files \\cloud\remote
    54  
    55  When the program ends while in foreground mode, either via Ctrl+C or receiving
    56  a SIGINT or SIGTERM signal, the mount should be automatically stopped.
    57  
    58  When running in background mode the user will have to stop the mount manually:
    59  
    60      # Linux
    61      fusermount -u /path/to/local/mount
    62      # OS X
    63      umount /path/to/local/mount
    64  
    65  The umount operation can fail, for example when the mountpoint is busy.
    66  When that happens, it is the user's responsibility to stop the mount manually.
    67  
    68  The size of the mounted file system will be set according to information retrieved
    69  from the remote, the same as returned by the [rclone about](https://rclone.org/commands/rclone_about/)
    70  command. Remotes with unlimited storage may report the used size only,
    71  then an additional 1 PiB of free space is assumed. If the remote does not
    72  [support](https://rclone.org/overview/#optional-features) the about feature
    73  at all, then 1 PiB is set as both the total and the free size.
    74  
    75  ## Installing on Windows
    76  
    77  To run rclone nfsmount on Windows, you will need to
    78  download and install [WinFsp](http://www.secfs.net/winfsp/).
    79  
    80  [WinFsp](https://github.com/winfsp/winfsp) is an open-source
    81  Windows File System Proxy which makes it easy to write user space file
    82  systems for Windows.  It provides a FUSE emulation layer which rclone
    83  uses combination with [cgofuse](https://github.com/winfsp/cgofuse).
    84  Both of these packages are by Bill Zissimopoulos who was very helpful
    85  during the implementation of rclone nfsmount for Windows.
    86  
    87  ### Mounting modes on windows
    88  
    89  Unlike other operating systems, Microsoft Windows provides a different filesystem
    90  type for network and fixed drives. It optimises access on the assumption fixed
    91  disk drives are fast and reliable, while network drives have relatively high latency
    92  and less reliability. Some settings can also be differentiated between the two types,
    93  for example that Windows Explorer should just display icons and not create preview
    94  thumbnails for image and video files on network drives.
    95  
    96  In most cases, rclone will mount the remote as a normal, fixed disk drive by default.
    97  However, you can also choose to mount it as a remote network drive, often described
    98  as a network share. If you mount an rclone remote using the default, fixed drive mode
    99  and experience unexpected program errors, freezes or other issues, consider mounting
   100  as a network drive instead.
   101  
   102  When mounting as a fixed disk drive you can either mount to an unused drive letter,
   103  or to a path representing a **nonexistent** subdirectory of an **existing** parent
   104  directory or drive. Using the special value `*` will tell rclone to
   105  automatically assign the next available drive letter, starting with Z: and moving backward.
   106  Examples:
   107  
   108      rclone nfsmount remote:path/to/files *
   109      rclone nfsmount remote:path/to/files X:
   110      rclone nfsmount remote:path/to/files C:\path\parent\mount
   111      rclone nfsmount remote:path/to/files X:
   112  
   113  Option `--volname` can be used to set a custom volume name for the mounted
   114  file system. The default is to use the remote name and path.
   115  
   116  To mount as network drive, you can add option `--network-mode`
   117  to your nfsmount command. Mounting to a directory path is not supported in
   118  this mode, it is a limitation Windows imposes on junctions, so the remote must always
   119  be mounted to a drive letter.
   120  
   121      rclone nfsmount remote:path/to/files X: --network-mode
   122  
   123  A volume name specified with `--volname` will be used to create the network share path.
   124  A complete UNC path, such as `\\cloud\remote`, optionally with path
   125  `\\cloud\remote\madeup\path`, will be used as is. Any other
   126  string will be used as the share part, after a default prefix `\\server\`.
   127  If no volume name is specified then `\\server\share` will be used.
   128  You must make sure the volume name is unique when you are mounting more than one drive,
   129  or else the mount command will fail. The share name will treated as the volume label for
   130  the mapped drive, shown in Windows Explorer etc, while the complete
   131  `\\server\share` will be reported as the remote UNC path by
   132  `net use` etc, just like a normal network drive mapping.
   133  
   134  If you specify a full network share UNC path with `--volname`, this will implicitly
   135  set the `--network-mode` option, so the following two examples have same result:
   136  
   137      rclone nfsmount remote:path/to/files X: --network-mode
   138      rclone nfsmount remote:path/to/files X: --volname \\server\share
   139  
   140  You may also specify the network share UNC path as the mountpoint itself. Then rclone
   141  will automatically assign a drive letter, same as with `*` and use that as
   142  mountpoint, and instead use the UNC path specified as the volume name, as if it were
   143  specified with the `--volname` option. This will also implicitly set
   144  the `--network-mode` option. This means the following two examples have same result:
   145  
   146      rclone nfsmount remote:path/to/files \\cloud\remote
   147      rclone nfsmount remote:path/to/files * --volname \\cloud\remote
   148  
   149  There is yet another way to enable network mode, and to set the share path,
   150  and that is to pass the "native" libfuse/WinFsp option directly:
   151  `--fuse-flag --VolumePrefix=\server\share`. Note that the path
   152  must be with just a single backslash prefix in this case.
   153  
   154  
   155  *Note:* In previous versions of rclone this was the only supported method.
   156  
   157  [Read more about drive mapping](https://en.wikipedia.org/wiki/Drive_mapping)
   158  
   159  See also [Limitations](#limitations) section below.
   160  
   161  ### Windows filesystem permissions
   162  
   163  The FUSE emulation layer on Windows must convert between the POSIX-based
   164  permission model used in FUSE, and the permission model used in Windows,
   165  based on access-control lists (ACL).
   166  
   167  The mounted filesystem will normally get three entries in its access-control list (ACL),
   168  representing permissions for the POSIX permission scopes: Owner, group and others.
   169  By default, the owner and group will be taken from the current user, and the built-in
   170  group "Everyone" will be used to represent others. The user/group can be customized
   171  with FUSE options "UserName" and "GroupName",
   172  e.g. `-o UserName=user123 -o GroupName="Authenticated Users"`.
   173  The permissions on each entry will be set according to [options](#options)
   174  `--dir-perms` and `--file-perms`, which takes a value in traditional Unix
   175  [numeric notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation).
   176  
   177  The default permissions corresponds to `--file-perms 0666 --dir-perms 0777`,
   178  i.e. read and write permissions to everyone. This means you will not be able
   179  to start any programs from the mount. To be able to do that you must add
   180  execute permissions, e.g. `--file-perms 0777 --dir-perms 0777` to add it
   181  to everyone. If the program needs to write files, chances are you will
   182  have to enable [VFS File Caching](#vfs-file-caching) as well (see also
   183  [limitations](#limitations)). Note that the default write permission have
   184  some restrictions for accounts other than the owner, specifically it lacks
   185  the "write extended attributes", as explained next.
   186  
   187  The mapping of permissions is not always trivial, and the result you see in
   188  Windows Explorer may not be exactly like you expected. For example, when setting
   189  a value that includes write access for the group or others scope, this will be
   190  mapped to individual permissions "write attributes", "write data" and
   191  "append data", but not "write extended attributes". Windows will then show this
   192  as basic permission "Special" instead of "Write", because "Write" also covers
   193  the "write extended attributes" permission. When setting digit 0 for group or
   194  others, to indicate no permissions, they will still get individual permissions
   195  "read attributes", "read extended attributes" and "read permissions". This is
   196  done for compatibility reasons, e.g. to allow users without additional
   197  permissions to be able to read basic metadata about files like in Unix.
   198  
   199  WinFsp 2021 (version 1.9) introduced a new FUSE option "FileSecurity",
   200  that allows the complete specification of file security descriptors using
   201  [SDDL](https://docs.microsoft.com/en-us/windows/win32/secauthz/security-descriptor-string-format).
   202  With this you get detailed control of the resulting permissions, compared
   203  to use of the POSIX permissions described above, and no additional permissions
   204  will be added automatically for compatibility with Unix. Some example use
   205  cases will following.
   206  
   207  If you set POSIX permissions for only allowing access to the owner,
   208  using `--file-perms 0600 --dir-perms 0700`, the user group and the built-in
   209  "Everyone" group will still be given some special permissions, as described
   210  above. Some programs may then (incorrectly) interpret this as the file being
   211  accessible by everyone, for example an SSH client may warn about "unprotected
   212  private key file". You can work around this by specifying
   213  `-o FileSecurity="D:P(A;;FA;;;OW)"`, which sets file all access (FA) to the
   214  owner (OW), and nothing else.
   215  
   216  When setting write permissions then, except for the owner, this does not
   217  include the "write extended attributes" permission, as mentioned above.
   218  This may prevent applications from writing to files, giving permission denied
   219  error instead. To set working write permissions for the built-in "Everyone"
   220  group, similar to what it gets by default but with the addition of the
   221  "write extended attributes", you can specify
   222  `-o FileSecurity="D:P(A;;FRFW;;;WD)"`, which sets file read (FR) and file
   223  write (FW) to everyone (WD). If file execute (FX) is also needed, then change
   224  to `-o FileSecurity="D:P(A;;FRFWFX;;;WD)"`, or set file all access (FA) to
   225  get full access permissions, including delete, with
   226  `-o FileSecurity="D:P(A;;FA;;;WD)"`.
   227  
   228  ### Windows caveats
   229  
   230  Drives created as Administrator are not visible to other accounts,
   231  not even an account that was elevated to Administrator with the
   232  User Account Control (UAC) feature. A result of this is that if you mount
   233  to a drive letter from a Command Prompt run as Administrator, and then try
   234  to access the same drive from Windows Explorer (which does not run as
   235  Administrator), you will not be able to see the mounted drive.
   236  
   237  If you don't need to access the drive from applications running with
   238  administrative privileges, the easiest way around this is to always
   239  create the mount from a non-elevated command prompt.
   240  
   241  To make mapped drives available to the user account that created them
   242  regardless if elevated or not, there is a special Windows setting called
   243  [linked connections](https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/mapped-drives-not-available-from-elevated-command#detail-to-configure-the-enablelinkedconnections-registry-entry)
   244  that can be enabled.
   245  
   246  It is also possible to make a drive mount available to everyone on the system,
   247  by running the process creating it as the built-in SYSTEM account.
   248  There are several ways to do this: One is to use the command-line
   249  utility [PsExec](https://docs.microsoft.com/en-us/sysinternals/downloads/psexec),
   250  from Microsoft's Sysinternals suite, which has option `-s` to start
   251  processes as the SYSTEM account. Another alternative is to run the mount
   252  command from a Windows Scheduled Task, or a Windows Service, configured
   253  to run as the SYSTEM account. A third alternative is to use the
   254  [WinFsp.Launcher infrastructure](https://github.com/winfsp/winfsp/wiki/WinFsp-Service-Architecture)).
   255  Read more in the [install documentation](https://rclone.org/install/).
   256  Note that when running rclone as another user, it will not use
   257  the configuration file from your profile unless you tell it to
   258  with the [`--config`](https://rclone.org/docs/#config-config-file) option.
   259  Note also that it is now the SYSTEM account that will have the owner
   260  permissions, and other accounts will have permissions according to the
   261  group or others scopes. As mentioned above, these will then not get the
   262  "write extended attributes" permission, and this may prevent writing to
   263  files. You can work around this with the FileSecurity option, see
   264  example above.
   265  
   266  Note that mapping to a directory path, instead of a drive letter,
   267  does not suffer from the same limitations.
   268  
   269  ## Mounting on macOS
   270  
   271  Mounting on macOS can be done either via [built-in NFS server](/commands/rclone_serve_nfs/), [macFUSE](https://osxfuse.github.io/) 
   272  (also known as osxfuse) or [FUSE-T](https://www.fuse-t.org/). macFUSE is a traditional
   273  FUSE driver utilizing a macOS kernel extension (kext). FUSE-T is an alternative FUSE system
   274  which "mounts" via an NFSv4 local server.
   275  
   276  #### Unicode Normalization
   277  
   278  It is highly recommended to keep the default of `--no-unicode-normalization=false`
   279  for all `mount` and `serve` commands on macOS. For details, see [vfs-case-sensitivity](https://rclone.org/commands/rclone_mount/#vfs-case-sensitivity).
   280  
   281  ### NFS mount
   282  
   283  This method spins up an NFS server using [serve nfs](/commands/rclone_serve_nfs/) command and mounts
   284  it to the specified mountpoint. If you run this in background mode using |--daemon|, you will need to
   285  send SIGTERM signal to the rclone process using |kill| command to stop the mount.
   286  
   287  Note that `--nfs-cache-handle-limit` controls the maximum number of cached file handles stored by the `nfsmount` caching handler.
   288  This should not be set too low or you may experience errors when trying to access files. The default is 1000000,
   289  but consider lowering this limit if the server's system resource usage causes problems.
   290  
   291  ### macFUSE Notes
   292  
   293  If installing macFUSE using [dmg packages](https://github.com/osxfuse/osxfuse/releases) from
   294  the website, rclone will locate the macFUSE libraries without any further intervention.
   295  If however, macFUSE is installed using the [macports](https://www.macports.org/) package manager,
   296  the following addition steps are required.
   297  
   298      sudo mkdir /usr/local/lib
   299      cd /usr/local/lib
   300      sudo ln -s /opt/local/lib/libfuse.2.dylib
   301  
   302  ### FUSE-T Limitations, Caveats, and Notes
   303  
   304  There are some limitations, caveats, and notes about how it works. These are current as 
   305  of FUSE-T version 1.0.14.
   306  
   307  #### ModTime update on read
   308  
   309  As per the [FUSE-T wiki](https://github.com/macos-fuse-t/fuse-t/wiki#caveats):
   310  
   311  > File access and modification times cannot be set separately as it seems to be an 
   312  > issue with the NFS client which always modifies both. Can be reproduced with 
   313  > 'touch -m' and 'touch -a' commands
   314  
   315  This means that viewing files with various tools, notably macOS Finder, will cause rlcone
   316  to update the modification time of the file. This may make rclone upload a full new copy
   317  of the file.
   318      
   319  #### Read Only mounts
   320  
   321  When mounting with `--read-only`, attempts to write to files will fail *silently* as
   322  opposed to with a clear warning as in macFUSE.
   323  
   324  ## Limitations
   325  
   326  Without the use of `--vfs-cache-mode` this can only write files
   327  sequentially, it can only seek when reading.  This means that many
   328  applications won't work with their files on an rclone mount without
   329  `--vfs-cache-mode writes` or `--vfs-cache-mode full`.
   330  See the [VFS File Caching](#vfs-file-caching) section for more info.
   331  When using NFS mount on macOS, if you don't specify |--vfs-cache-mode|
   332  the mount point will be read-only.
   333  
   334  The bucket-based remotes (e.g. Swift, S3, Google Compute Storage, B2)
   335  do not support the concept of empty directories, so empty
   336  directories will have a tendency to disappear once they fall out of
   337  the directory cache.
   338  
   339  When `rclone mount` is invoked on Unix with `--daemon` flag, the main rclone
   340  program will wait for the background mount to become ready or until the timeout
   341  specified by the `--daemon-wait` flag. On Linux it can check mount status using
   342  ProcFS so the flag in fact sets **maximum** time to wait, while the real wait
   343  can be less. On macOS / BSD the time to wait is constant and the check is
   344  performed only at the end. We advise you to set wait time on macOS reasonably.
   345  
   346  Only supported on Linux, FreeBSD, OS X and Windows at the moment.
   347  
   348  ## rclone nfsmount vs rclone sync/copy
   349  
   350  File systems expect things to be 100% reliable, whereas cloud storage
   351  systems are a long way from 100% reliable. The rclone sync/copy
   352  commands cope with this with lots of retries.  However rclone nfsmount
   353  can't use retries in the same way without making local copies of the
   354  uploads. Look at the [VFS File Caching](#vfs-file-caching)
   355  for solutions to make nfsmount more reliable.
   356  
   357  ## Attribute caching
   358  
   359  You can use the flag `--attr-timeout` to set the time the kernel caches
   360  the attributes (size, modification time, etc.) for directory entries.
   361  
   362  The default is `1s` which caches files just long enough to avoid
   363  too many callbacks to rclone from the kernel.
   364  
   365  In theory 0s should be the correct value for filesystems which can
   366  change outside the control of the kernel. However this causes quite a
   367  few problems such as
   368  [rclone using too much memory](https://github.com/artpar/artpar/issues/2157),
   369  [rclone not serving files to samba](https://forum.rclone.org/t/rclone-1-39-vs-1-40-mount-issue/5112)
   370  and [excessive time listing directories](https://github.com/artpar/artpar/issues/2095#issuecomment-371141147).
   371  
   372  The kernel can cache the info about a file for the time given by
   373  `--attr-timeout`. You may see corruption if the remote file changes
   374  length during this window.  It will show up as either a truncated file
   375  or a file with garbage on the end.  With `--attr-timeout 1s` this is
   376  very unlikely but not impossible.  The higher you set `--attr-timeout`
   377  the more likely it is.  The default setting of "1s" is the lowest
   378  setting which mitigates the problems above.
   379  
   380  If you set it higher (`10s` or `1m` say) then the kernel will call
   381  back to rclone less often making it more efficient, however there is
   382  more chance of the corruption issue above.
   383  
   384  If files don't change on the remote outside of the control of rclone
   385  then there is no chance of corruption.
   386  
   387  This is the same as setting the attr_timeout option in mount.fuse.
   388  
   389  ## Filters
   390  
   391  Note that all the rclone filters can be used to select a subset of the
   392  files to be visible in the mount.
   393  
   394  ## systemd
   395  
   396  When running rclone nfsmount as a systemd service, it is possible
   397  to use Type=notify. In this case the service will enter the started state
   398  after the mountpoint has been successfully set up.
   399  Units having the rclone nfsmount service specified as a requirement
   400  will see all files and folders immediately in this mode.
   401  
   402  Note that systemd runs mount units without any environment variables including
   403  `PATH` or `HOME`. This means that tilde (`~`) expansion will not work
   404  and you should provide `--config` and `--cache-dir` explicitly as absolute
   405  paths via rclone arguments.
   406  Since mounting requires the `fusermount` program, rclone will use the fallback
   407  PATH of `/bin:/usr/bin` in this scenario. Please ensure that `fusermount`
   408  is present on this PATH.
   409  
   410  ## Rclone as Unix mount helper
   411  
   412  The core Unix program `/bin/mount` normally takes the `-t FSTYPE` argument
   413  then runs the `/sbin/mount.FSTYPE` helper program passing it mount options
   414  as `-o key=val,...` or `--opt=...`. Automount (classic or systemd) behaves
   415  in a similar way.
   416  
   417  rclone by default expects GNU-style flags `--key val`. To run it as a mount
   418  helper you should symlink rclone binary to `/sbin/mount.rclone` and optionally
   419  `/usr/bin/rclonefs`, e.g. `ln -s /usr/bin/rclone /sbin/mount.rclone`.
   420  rclone will detect it and translate command-line arguments appropriately.
   421  
   422  Now you can run classic mounts like this:
   423  ```
   424  mount sftp1:subdir /mnt/data -t rclone -o vfs_cache_mode=writes,sftp_key_file=/path/to/pem
   425  ```
   426  
   427  or create systemd mount units:
   428  ```
   429  # /etc/systemd/system/mnt-data.mount
   430  [Unit]
   431  Description=Mount for /mnt/data
   432  [Mount]
   433  Type=rclone
   434  What=sftp1:subdir
   435  Where=/mnt/data
   436  Options=rw,_netdev,allow_other,args2env,vfs-cache-mode=writes,config=/etc/rclone.conf,cache-dir=/var/rclone
   437  ```
   438  
   439  optionally accompanied by systemd automount unit
   440  ```
   441  # /etc/systemd/system/mnt-data.automount
   442  [Unit]
   443  Description=AutoMount for /mnt/data
   444  [Automount]
   445  Where=/mnt/data
   446  TimeoutIdleSec=600
   447  [Install]
   448  WantedBy=multi-user.target
   449  ```
   450  
   451  or add in `/etc/fstab` a line like
   452  ```
   453  sftp1:subdir /mnt/data rclone rw,noauto,nofail,_netdev,x-systemd.automount,args2env,vfs_cache_mode=writes,config=/etc/rclone.conf,cache_dir=/var/cache/rclone 0 0
   454  ```
   455  
   456  or use classic Automountd.
   457  Remember to provide explicit `config=...,cache-dir=...` as a workaround for
   458  mount units being run without `HOME`.
   459  
   460  Rclone in the mount helper mode will split `-o` argument(s) by comma, replace `_`
   461  by `-` and prepend `--` to get the command-line flags. Options containing commas
   462  or spaces can be wrapped in single or double quotes. Any inner quotes inside outer
   463  quotes of the same type should be doubled.
   464  
   465  Mount option syntax includes a few extra options treated specially:
   466  
   467  - `env.NAME=VALUE` will set an environment variable for the mount process.
   468    This helps with Automountd and Systemd.mount which don't allow setting
   469    custom environment for mount helpers.
   470    Typically you will use `env.HTTPS_PROXY=proxy.host:3128` or `env.HOME=/root`
   471  - `command=cmount` can be used to run `cmount` or any other rclone command
   472    rather than the default `mount`.
   473  - `args2env` will pass mount options to the mount helper running in background
   474    via environment variables instead of command line arguments. This allows to
   475    hide secrets from such commands as `ps` or `pgrep`.
   476  - `vv...` will be transformed into appropriate `--verbose=N`
   477  - standard mount options like `x-systemd.automount`, `_netdev`, `nosuid` and alike
   478    are intended only for Automountd and ignored by rclone.
   479  
   480  ## VFS - Virtual File System
   481  
   482  This command uses the VFS layer. This adapts the cloud storage objects
   483  that rclone uses into something which looks much more like a disk
   484  filing system.
   485  
   486  Cloud storage objects have lots of properties which aren't like disk
   487  files - you can't extend them or write to the middle of them, so the
   488  VFS layer has to deal with that. Because there is no one right way of
   489  doing this there are various options explained below.
   490  
   491  The VFS layer also implements a directory cache - this caches info
   492  about files and directories (but not the data) in memory.
   493  
   494  ## VFS Directory Cache
   495  
   496  Using the `--dir-cache-time` flag, you can control how long a
   497  directory should be considered up to date and not refreshed from the
   498  backend. Changes made through the VFS will appear immediately or
   499  invalidate the cache.
   500  
   501      --dir-cache-time duration   Time to cache directory entries for (default 5m0s)
   502      --poll-interval duration    Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable (default 1m0s)
   503  
   504  However, changes made directly on the cloud storage by the web
   505  interface or a different copy of rclone will only be picked up once
   506  the directory cache expires if the backend configured does not support
   507  polling for changes. If the backend supports polling, changes will be
   508  picked up within the polling interval.
   509  
   510  You can send a `SIGHUP` signal to rclone for it to flush all
   511  directory caches, regardless of how old they are.  Assuming only one
   512  rclone instance is running, you can reset the cache like this:
   513  
   514      kill -SIGHUP $(pidof rclone)
   515  
   516  If you configure rclone with a [remote control](/rc) then you can use
   517  rclone rc to flush the whole directory cache:
   518  
   519      rclone rc vfs/forget
   520  
   521  Or individual files or directories:
   522  
   523      rclone rc vfs/forget file=path/to/file dir=path/to/dir
   524  
   525  ## VFS File Buffering
   526  
   527  The `--buffer-size` flag determines the amount of memory,
   528  that will be used to buffer data in advance.
   529  
   530  Each open file will try to keep the specified amount of data in memory
   531  at all times. The buffered data is bound to one open file and won't be
   532  shared.
   533  
   534  This flag is a upper limit for the used memory per open file.  The
   535  buffer will only use memory for data that is downloaded but not not
   536  yet read. If the buffer is empty, only a small amount of memory will
   537  be used.
   538  
   539  The maximum memory used by rclone for buffering can be up to
   540  `--buffer-size * open files`.
   541  
   542  ## VFS File Caching
   543  
   544  These flags control the VFS file caching options. File caching is
   545  necessary to make the VFS layer appear compatible with a normal file
   546  system. It can be disabled at the cost of some compatibility.
   547  
   548  For example you'll need to enable VFS caching if you want to read and
   549  write simultaneously to a file.  See below for more details.
   550  
   551  Note that the VFS cache is separate from the cache backend and you may
   552  find that you need one or the other or both.
   553  
   554      --cache-dir string                     Directory rclone will use for caching.
   555      --vfs-cache-mode CacheMode             Cache mode off|minimal|writes|full (default off)
   556      --vfs-cache-max-age duration           Max time since last access of objects in the cache (default 1h0m0s)
   557      --vfs-cache-max-size SizeSuffix        Max total size of objects in the cache (default off)
   558      --vfs-cache-min-free-space SizeSuffix  Target minimum free space on the disk containing the cache (default off)
   559      --vfs-cache-poll-interval duration     Interval to poll the cache for stale objects (default 1m0s)
   560      --vfs-write-back duration              Time to writeback files after last use when using cache (default 5s)
   561  
   562  If run with `-vv` rclone will print the location of the file cache.  The
   563  files are stored in the user cache file area which is OS dependent but
   564  can be controlled with `--cache-dir` or setting the appropriate
   565  environment variable.
   566  
   567  The cache has 4 different modes selected by `--vfs-cache-mode`.
   568  The higher the cache mode the more compatible rclone becomes at the
   569  cost of using disk space.
   570  
   571  Note that files are written back to the remote only when they are
   572  closed and if they haven't been accessed for `--vfs-write-back`
   573  seconds. If rclone is quit or dies with files that haven't been
   574  uploaded, these will be uploaded next time rclone is run with the same
   575  flags.
   576  
   577  If using `--vfs-cache-max-size` or `--vfs-cache-min-free-size` note
   578  that the cache may exceed these quotas for two reasons. Firstly
   579  because it is only checked every `--vfs-cache-poll-interval`. Secondly
   580  because open files cannot be evicted from the cache. When
   581  `--vfs-cache-max-size` or `--vfs-cache-min-free-size` is exceeded,
   582  rclone will attempt to evict the least accessed files from the cache
   583  first. rclone will start with files that haven't been accessed for the
   584  longest. This cache flushing strategy is efficient and more relevant
   585  files are likely to remain cached.
   586  
   587  The `--vfs-cache-max-age` will evict files from the cache
   588  after the set time since last access has passed. The default value of
   589  1 hour will start evicting files from cache that haven't been accessed
   590  for 1 hour. When a cached file is accessed the 1 hour timer is reset to 0
   591  and will wait for 1 more hour before evicting. Specify the time with
   592  standard notation, s, m, h, d, w .
   593  
   594  You **should not** run two copies of rclone using the same VFS cache
   595  with the same or overlapping remotes if using `--vfs-cache-mode > off`.
   596  This can potentially cause data corruption if you do. You can work
   597  around this by giving each rclone its own cache hierarchy with
   598  `--cache-dir`. You don't need to worry about this if the remotes in
   599  use don't overlap.
   600  
   601  ### --vfs-cache-mode off
   602  
   603  In this mode (the default) the cache will read directly from the remote and write
   604  directly to the remote without caching anything on disk.
   605  
   606  This will mean some operations are not possible
   607  
   608    * Files can't be opened for both read AND write
   609    * Files opened for write can't be seeked
   610    * Existing files opened for write must have O_TRUNC set
   611    * Files open for read with O_TRUNC will be opened write only
   612    * Files open for write only will behave as if O_TRUNC was supplied
   613    * Open modes O_APPEND, O_TRUNC are ignored
   614    * If an upload fails it can't be retried
   615  
   616  ### --vfs-cache-mode minimal
   617  
   618  This is very similar to "off" except that files opened for read AND
   619  write will be buffered to disk.  This means that files opened for
   620  write will be a lot more compatible, but uses the minimal disk space.
   621  
   622  These operations are not possible
   623  
   624    * Files opened for write only can't be seeked
   625    * Existing files opened for write must have O_TRUNC set
   626    * Files opened for write only will ignore O_APPEND, O_TRUNC
   627    * If an upload fails it can't be retried
   628  
   629  ### --vfs-cache-mode writes
   630  
   631  In this mode files opened for read only are still read directly from
   632  the remote, write only and read/write files are buffered to disk
   633  first.
   634  
   635  This mode should support all normal file system operations.
   636  
   637  If an upload fails it will be retried at exponentially increasing
   638  intervals up to 1 minute.
   639  
   640  ### --vfs-cache-mode full
   641  
   642  In this mode all reads and writes are buffered to and from disk. When
   643  data is read from the remote this is buffered to disk as well.
   644  
   645  In this mode the files in the cache will be sparse files and rclone
   646  will keep track of which bits of the files it has downloaded.
   647  
   648  So if an application only reads the starts of each file, then rclone
   649  will only buffer the start of the file. These files will appear to be
   650  their full size in the cache, but they will be sparse files with only
   651  the data that has been downloaded present in them.
   652  
   653  This mode should support all normal file system operations and is
   654  otherwise identical to `--vfs-cache-mode` writes.
   655  
   656  When reading a file rclone will read `--buffer-size` plus
   657  `--vfs-read-ahead` bytes ahead.  The `--buffer-size` is buffered in memory
   658  whereas the `--vfs-read-ahead` is buffered on disk.
   659  
   660  When using this mode it is recommended that `--buffer-size` is not set
   661  too large and `--vfs-read-ahead` is set large if required.
   662  
   663  **IMPORTANT** not all file systems support sparse files. In particular
   664  FAT/exFAT do not. Rclone will perform very badly if the cache
   665  directory is on a filesystem which doesn't support sparse files and it
   666  will log an ERROR message if one is detected.
   667  
   668  ### Fingerprinting
   669  
   670  Various parts of the VFS use fingerprinting to see if a local file
   671  copy has changed relative to a remote file. Fingerprints are made
   672  from:
   673  
   674  - size
   675  - modification time
   676  - hash
   677  
   678  where available on an object.
   679  
   680  On some backends some of these attributes are slow to read (they take
   681  an extra API call per object, or extra work per object).
   682  
   683  For example `hash` is slow with the `local` and `sftp` backends as
   684  they have to read the entire file and hash it, and `modtime` is slow
   685  with the `s3`, `swift`, `ftp` and `qinqstor` backends because they
   686  need to do an extra API call to fetch it.
   687  
   688  If you use the `--vfs-fast-fingerprint` flag then rclone will not
   689  include the slow operations in the fingerprint. This makes the
   690  fingerprinting less accurate but much faster and will improve the
   691  opening time of cached files.
   692  
   693  If you are running a vfs cache over `local`, `s3` or `swift` backends
   694  then using this flag is recommended.
   695  
   696  Note that if you change the value of this flag, the fingerprints of
   697  the files in the cache may be invalidated and the files will need to
   698  be downloaded again.
   699  
   700  ## VFS Chunked Reading
   701  
   702  When rclone reads files from a remote it reads them in chunks. This
   703  means that rather than requesting the whole file rclone reads the
   704  chunk specified.  This can reduce the used download quota for some
   705  remotes by requesting only chunks from the remote that are actually
   706  read, at the cost of an increased number of requests.
   707  
   708  These flags control the chunking:
   709  
   710      --vfs-read-chunk-size SizeSuffix        Read the source objects in chunks (default 128M)
   711      --vfs-read-chunk-size-limit SizeSuffix  Max chunk doubling size (default off)
   712  
   713  Rclone will start reading a chunk of size `--vfs-read-chunk-size`,
   714  and then double the size for each read. When `--vfs-read-chunk-size-limit` is
   715  specified, and greater than `--vfs-read-chunk-size`, the chunk size for each
   716  open file will get doubled only until the specified value is reached. If the
   717  value is "off", which is the default, the limit is disabled and the chunk size
   718  will grow indefinitely.
   719  
   720  With `--vfs-read-chunk-size 100M` and `--vfs-read-chunk-size-limit 0`
   721  the following parts will be downloaded: 0-100M, 100M-200M, 200M-300M, 300M-400M and so on.
   722  When `--vfs-read-chunk-size-limit 500M` is specified, the result would be
   723  0-100M, 100M-300M, 300M-700M, 700M-1200M, 1200M-1700M and so on.
   724  
   725  Setting `--vfs-read-chunk-size` to `0` or "off" disables chunked reading.
   726  
   727  ## VFS Performance
   728  
   729  These flags may be used to enable/disable features of the VFS for
   730  performance or other reasons. See also the [chunked reading](#vfs-chunked-reading)
   731  feature.
   732  
   733  In particular S3 and Swift benefit hugely from the `--no-modtime` flag
   734  (or use `--use-server-modtime` for a slightly different effect) as each
   735  read of the modification time takes a transaction.
   736  
   737      --no-checksum     Don't compare checksums on up/download.
   738      --no-modtime      Don't read/write the modification time (can speed things up).
   739      --no-seek         Don't allow seeking in files.
   740      --read-only       Only allow read-only access.
   741  
   742  Sometimes rclone is delivered reads or writes out of order. Rather
   743  than seeking rclone will wait a short time for the in sequence read or
   744  write to come in. These flags only come into effect when not using an
   745  on disk cache file.
   746  
   747      --vfs-read-wait duration   Time to wait for in-sequence read before seeking (default 20ms)
   748      --vfs-write-wait duration  Time to wait for in-sequence write before giving error (default 1s)
   749  
   750  When using VFS write caching (`--vfs-cache-mode` with value writes or full),
   751  the global flag `--transfers` can be set to adjust the number of parallel uploads of
   752  modified files from the cache (the related global flag `--checkers` has no effect on the VFS).
   753  
   754      --transfers int  Number of file transfers to run in parallel (default 4)
   755  
   756  ## VFS Case Sensitivity
   757  
   758  Linux file systems are case-sensitive: two files can differ only
   759  by case, and the exact case must be used when opening a file.
   760  
   761  File systems in modern Windows are case-insensitive but case-preserving:
   762  although existing files can be opened using any case, the exact case used
   763  to create the file is preserved and available for programs to query.
   764  It is not allowed for two files in the same directory to differ only by case.
   765  
   766  Usually file systems on macOS are case-insensitive. It is possible to make macOS
   767  file systems case-sensitive but that is not the default.
   768  
   769  The `--vfs-case-insensitive` VFS flag controls how rclone handles these
   770  two cases. If its value is "false", rclone passes file names to the remote
   771  as-is. If the flag is "true" (or appears without a value on the
   772  command line), rclone may perform a "fixup" as explained below.
   773  
   774  The user may specify a file name to open/delete/rename/etc with a case
   775  different than what is stored on the remote. If an argument refers
   776  to an existing file with exactly the same name, then the case of the existing
   777  file on the disk will be used. However, if a file name with exactly the same
   778  name is not found but a name differing only by case exists, rclone will
   779  transparently fixup the name. This fixup happens only when an existing file
   780  is requested. Case sensitivity of file names created anew by rclone is
   781  controlled by the underlying remote.
   782  
   783  Note that case sensitivity of the operating system running rclone (the target)
   784  may differ from case sensitivity of a file system presented by rclone (the source).
   785  The flag controls whether "fixup" is performed to satisfy the target.
   786  
   787  If the flag is not provided on the command line, then its default value depends
   788  on the operating system where rclone runs: "true" on Windows and macOS, "false"
   789  otherwise. If the flag is provided without a value, then it is "true".
   790  
   791  The `--no-unicode-normalization` flag controls whether a similar "fixup" is
   792  performed for filenames that differ but are [canonically
   793  equivalent](https://en.wikipedia.org/wiki/Unicode_equivalence) with respect to
   794  unicode. Unicode normalization can be particularly helpful for users of macOS,
   795  which prefers form NFD instead of the NFC used by most other platforms. It is
   796  therefore highly recommended to keep the default of `false` on macOS, to avoid
   797  encoding compatibility issues.
   798  
   799  In the (probably unlikely) event that a directory has multiple duplicate
   800  filenames after applying case and unicode normalization, the `--vfs-block-norm-dupes`
   801  flag allows hiding these duplicates. This comes with a performance tradeoff, as
   802  rclone will have to scan the entire directory for duplicates when listing a
   803  directory. For this reason, it is recommended to leave this disabled if not
   804  needed. However, macOS users may wish to consider using it, as otherwise, if a
   805  remote directory contains both NFC and NFD versions of the same filename, an odd
   806  situation will occur: both versions of the file will be visible in the mount,
   807  and both will appear to be editable, however, editing either version will
   808  actually result in only the NFD version getting edited under the hood. `--vfs-block-
   809  norm-dupes` prevents this confusion by detecting this scenario, hiding the
   810  duplicates, and logging an error, similar to how this is handled in `rclone
   811  sync`.
   812  
   813  ## VFS Disk Options
   814  
   815  This flag allows you to manually set the statistics about the filing system.
   816  It can be useful when those statistics cannot be read correctly automatically.
   817  
   818      --vfs-disk-space-total-size    Manually set the total disk space size (example: 256G, default: -1)
   819  
   820  ## Alternate report of used bytes
   821  
   822  Some backends, most notably S3, do not report the amount of bytes used.
   823  If you need this information to be available when running `df` on the
   824  filesystem, then pass the flag `--vfs-used-is-size` to rclone.
   825  With this flag set, instead of relying on the backend to report this
   826  information, rclone will scan the whole remote similar to `rclone size`
   827  and compute the total used space itself.
   828  
   829  _WARNING._ Contrary to `rclone size`, this flag ignores filters so that the
   830  result is accurate. However, this is very inefficient and may cost lots of API
   831  calls resulting in extra charges. Use it as a last resort and only with caching.
   832  
   833  
   834  ```
   835  rclone nfsmount remote:path /path/to/mountpoint [flags]
   836  ```
   837  
   838  ## Options
   839  
   840  ```
   841        --addr string                            IPaddress:Port or :Port to bind server to
   842        --allow-non-empty                        Allow mounting over a non-empty directory (not supported on Windows)
   843        --allow-other                            Allow access to other users (not supported on Windows)
   844        --allow-root                             Allow access to root user (not supported on Windows)
   845        --async-read                             Use asynchronous reads (not supported on Windows) (default true)
   846        --attr-timeout Duration                  Time for which file/directory attributes are cached (default 1s)
   847        --daemon                                 Run mount in background and exit parent process (as background output is suppressed, use --log-file with --log-format=pid,... to monitor) (not supported on Windows)
   848        --daemon-timeout Duration                Time limit for rclone to respond to kernel (not supported on Windows) (default 0s)
   849        --daemon-wait Duration                   Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s)
   850        --debug-fuse                             Debug the FUSE internals - needs -v
   851        --default-permissions                    Makes kernel enforce access control based on the file mode (not supported on Windows)
   852        --devname string                         Set the device name - default is remote:path
   853        --dir-cache-time Duration                Time to cache directory entries for (default 5m0s)
   854        --dir-perms FileMode                     Directory permissions (default 0777)
   855        --file-perms FileMode                    File permissions (default 0666)
   856        --fuse-flag stringArray                  Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required)
   857        --gid uint32                             Override the gid field set by the filesystem (not supported on Windows) (default 1000)
   858    -h, --help                                   help for nfsmount
   859        --max-read-ahead SizeSuffix              The number of bytes that can be prefetched for sequential reads (not supported on Windows) (default 128Ki)
   860        --mount-case-insensitive Tristate        Tell the OS the mount is case insensitive (true) or sensitive (false) regardless of the backend (auto) (default unset)
   861        --network-mode                           Mount as remote network drive, instead of fixed disk drive (supported on Windows only)
   862        --nfs-cache-handle-limit int             max file handles cached simultaneously (min 5) (default 1000000)
   863        --no-checksum                            Don't compare checksums on up/download
   864        --no-modtime                             Don't read/write the modification time (can speed things up)
   865        --no-seek                                Don't allow seeking in files
   866        --noappledouble                          Ignore Apple Double (._) and .DS_Store files (supported on OSX only) (default true)
   867        --noapplexattr                           Ignore all "com.apple.*" extended attributes (supported on OSX only)
   868    -o, --option stringArray                     Option for libfuse/WinFsp (repeat if required)
   869        --poll-interval Duration                 Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s)
   870        --read-only                              Only allow read-only access
   871        --sudo                                   Use sudo to run the mount command as root.
   872        --uid uint32                             Override the uid field set by the filesystem (not supported on Windows) (default 1000)
   873        --umask int                              Override the permission bits set by the filesystem (not supported on Windows) (default 2)
   874        --vfs-block-norm-dupes                   If duplicate filenames exist in the same directory (after normalization), log an error and hide the duplicates (may have a performance cost)
   875        --vfs-cache-max-age Duration             Max time since last access of objects in the cache (default 1h0m0s)
   876        --vfs-cache-max-size SizeSuffix          Max total size of objects in the cache (default off)
   877        --vfs-cache-min-free-space SizeSuffix    Target minimum free space on the disk containing the cache (default off)
   878        --vfs-cache-mode CacheMode               Cache mode off|minimal|writes|full (default off)
   879        --vfs-cache-poll-interval Duration       Interval to poll the cache for stale objects (default 1m0s)
   880        --vfs-case-insensitive                   If a file name not found, find a case insensitive match
   881        --vfs-disk-space-total-size SizeSuffix   Specify the total space of disk (default off)
   882        --vfs-fast-fingerprint                   Use fast (less accurate) fingerprints for change detection
   883        --vfs-read-ahead SizeSuffix              Extra read ahead over --buffer-size when using cache-mode full
   884        --vfs-read-chunk-size SizeSuffix         Read the source objects in chunks (default 128Mi)
   885        --vfs-read-chunk-size-limit SizeSuffix   If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off)
   886        --vfs-read-wait Duration                 Time to wait for in-sequence read before seeking (default 20ms)
   887        --vfs-refresh                            Refreshes the directory cache recursively in the background on start
   888        --vfs-used-is-size rclone size           Use the rclone size algorithm for Used size
   889        --vfs-write-back Duration                Time to writeback files after last use when using cache (default 5s)
   890        --vfs-write-wait Duration                Time to wait for in-sequence write before giving error (default 1s)
   891        --volname string                         Set the volume name (supported on Windows and OSX only)
   892        --write-back-cache                       Makes kernel buffer writes before sending them to rclone (without this, writethrough caching is used) (not supported on Windows)
   893  ```
   894  
   895  
   896  ## Filter Options
   897  
   898  Flags for filtering directory listings.
   899  
   900  ```
   901        --delete-excluded                     Delete files on dest excluded from sync
   902        --exclude stringArray                 Exclude files matching pattern
   903        --exclude-from stringArray            Read file exclude patterns from file (use - to read from stdin)
   904        --exclude-if-present stringArray      Exclude directories if filename is present
   905        --files-from stringArray              Read list of source-file names from file (use - to read from stdin)
   906        --files-from-raw stringArray          Read list of source-file names from file without any processing of lines (use - to read from stdin)
   907    -f, --filter stringArray                  Add a file filtering rule
   908        --filter-from stringArray             Read file filtering patterns from a file (use - to read from stdin)
   909        --ignore-case                         Ignore case in filters (case insensitive)
   910        --include stringArray                 Include files matching pattern
   911        --include-from stringArray            Read file include patterns from file (use - to read from stdin)
   912        --max-age Duration                    Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off)
   913        --max-depth int                       If set limits the recursion depth to this (default -1)
   914        --max-size SizeSuffix                 Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off)
   915        --metadata-exclude stringArray        Exclude metadatas matching pattern
   916        --metadata-exclude-from stringArray   Read metadata exclude patterns from file (use - to read from stdin)
   917        --metadata-filter stringArray         Add a metadata filtering rule
   918        --metadata-filter-from stringArray    Read metadata filtering patterns from a file (use - to read from stdin)
   919        --metadata-include stringArray        Include metadatas matching pattern
   920        --metadata-include-from stringArray   Read metadata include patterns from file (use - to read from stdin)
   921        --min-age Duration                    Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off)
   922        --min-size SizeSuffix                 Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off)
   923  ```
   924  
   925  See the [global flags page](/flags/) for global options not listed here.
   926  
   927  # SEE ALSO
   928  
   929  * [rclone](/commands/rclone/)	 - Show help for rclone commands, flags and backends.
   930