# File copy and reception

Starting with version 0.7.0 it's possible to upload files directly to remote clients and store them anywhere on the remote file system.

### Prerequisites

Both, the server and the clients must **run at least version 0.7.0** of Rport to use the file copy function. Updating all your clients is not necessary as long as you don't want to use this feature on them.

{% hint style="danger" %}
File reception is enabled by default on the rport client. If you consider it insecure, turn it off in the `rport.conf` file.

`[file-reception]`\
&#x20; `enabled = false`
{% endhint %}

Pay attention to the optional filters that can be used to exclude folders from write access. By default, files cannot be coped to most OS-critical folders. Extend the filters according to your needs.

```
[file-reception]
  ## Receive files pushed by the server, enabled by default
  # enabled = true
  ## The rport client will reject writing files to any of the following folders and its subfolders.
  ## https://oss.rport.io/docs/no18-file-upload.html
  ## Wildcards (glob) are supported.
  ## Linux defaults
  # protected = ['/bin', '/sbin', '/boot', '/usr/bin', '/usr/sbin', '/dev', '/lib*', '/run']
  ## Windows defaults
  # protected = ['C:\Windows\', 'C:\ProgramData']
```

🕵 On Linux, a **sudo rules is** needed and **created by default** to allow changing the owner and mode of a file. Review and/or delete `/etc/sudoers.d/rport-filereception` if it conflicts with your security policies.

### Transfer files

* Once a client allows file reception, click on the `Files` tab.
* Select a local file.
* Specify where the file should be store remotely. \
  👉 **You must enter a full path, not a folder.**
* On Linux, you can also specify the owner and mode of the file.

![Upload a file](https://1142160776-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MekeI9EovpQqbUTQSdM%2Fuploads%2Faz8iMDRL6nn5qP3BVluJ%2Fimage.png?alt=media\&token=25af2436-5727-4fac-8daa-34b8486bfb0c)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.openrport.io/digging-deeper/file-copy-and-reception.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
