FTP
With the rich file sharing features at Control Panel > File Services > FTP, you can turn your Synology Router into an FTP (File Transfer Protocol) server, allowing users to easily access and manage folders or files stored on the USB storage or external drives connected to your Synology Router. It is designed to make storing and sharing files within your local network quick and simple, allowing you to directly access data on the attached storage devices without going through the hassle of logging into SRM every time.
In this article, you will learn how to set up FTP and related file transfer services to access and share files on the attached storage devices, as well as manage advanced settings, such as encryption service, transfer log, and transfer speed limits.
Contents
- Configure FTP/FTPS service settings
- Configure SFTP service settings
- Manage advanced FTP settings (optional)
1. Configure FTP/FTPS service settings
You can enable FTP services to allow clients to access folders and data on the external storage devices. Before enabling FTP, please check the firewall settings for FTP service first (at Network Center > Security > Firewall) and make sure the following TCP ports have been enabled: 21 (default control connection), 20 (data connection for active mode) and 55536-55567 (data connection for passive mode).
To enable FTP service:
- Under the FTP / FTPS, you can tick the following checkboxes:
- Enable FTP service (No encryption): This is the standard network protocol used to transfer files. FTP does not provide any encryption to protect information during transfer sessions, such as passwords, usernames, or files. However, transfer speeds are faster and require fewer system resources.
- Enable FTP SSL/TLS encryption service (FTPS): A continuation of standard FTP with additional support for Transport Layer Security (TLS) and Secure Sockets Layer (SSL) cryptographic protocols, which protects information during transfer sessions, such as passwords, usernames, or files. However, transfer speeds are slower and consume more system resources due to encryption.
- Enter the following fields or tick the checkboxes if necessary:
- Timeout: The FTP server will disconnect idle users after the specified period of time.
- Port number settings of FTP service: This section allows you to specify the port used for the FTP control channel.
Note:
- The default port number for FTP control channel is 21. It can be set from 1 to 65535, excluding the following numbers: 20, 22, 23, 25, 80, 110, 137, 138, 139, 143, 199, 443, 445, 515, 543, 548, 587, 873, 993, 995, 3306, 3689, 5005, 5006, 5335, 5432, 6881, 7000, 7001, 8000, 8001, 8080, 8081, 9997, 9998, 9999, 80001, 80002, and eMule default ports: 4662 (TCP), 4672 (UDP).
- Port range of Passive FTP: This section allows you to specify the port range used for Passive FTP connections. You can use the default port range or specify a custom range. The port range can be set from 1025 to 65535, and can contain up to 128 ports.
- Report external IP in PASV mode: By enabling this option, the server will report its external IP address to FTP clients. The reported IP address will be displayed in the FTP client's connection log. Once this option is enabled, you can choose the automatically detected external IP address or manually input the external IP address of the Synology Router. This option only works when the Synology Router is behind a NAT, and the FTP clients belong to a different subnet than the Synology Router does. In most cases, this option is unnecessary, but if FTP clients fail to connect to the Synology Router, then you can enable this option and try again.
- Enable FXP: FXP stands for File eXchange Protocol. By enabling this option, FTP service will support the server-to-server file transfer function.
- UTF-8 encoding: Sometimes UTF-8 encoding is not displayed correctly owing to different FTP protocol implementations on some FTP clients. If you have enabled UTF-8 on your FTP client and it fails to correctly display file names, you can select Force from this drop-down menu.
- Support ASCII transfer mode: Enable this option to support the ASCII transfer mode, allowing the Synology Router to properly transfer ASCII formatted plain text files via FTP.
- Connection Restriction: See To restrict FTP connections below for more information.
- Once you have successfully enabled FTP service on your Synology Router, you can start accessing files on connected storage devices via FTP using your web browser or an FTP client. Please refer to this tutorial for detailed instructions.
To restrict FTP connections:
- Under the FTP / FTPS section, enable either FTP or FTP SSL/TLS encryption service, and then click Connection Restriction at the bottom.
- Select one of the following options:
- Limit connections per IP: When this function is enabled, the server will limit the maximum connections per IP. Enable this function and FTP bandwidth restriction to have effective bandwidth management.
- Enable FTP bandwidth restriction: Enable this function to restrict the bandwidth of a single FTP connection.
Note:
- The guest account cannot log in to the server via FTP. To allow anonymous users to access shared folders via FTP, please see To enable anonymous FTP access below for more information.
- The codepage setting on the FTP client computer must be the same as that of the Synology Router device in order to access the data correctly.
- On some specific models, FTP service supports connection using SSL or TLS.
- The firewall settings of your FTP client and two FTP servers should be configured correctly, or the FXP function may not work well.
- Certain FTP clients, such as those using Internet Explorer 8/9, need to log in with their username and password. For example: ftp://username:password@your.ftp.com.
2. Configure SFTP service settings
SFTP is a file transfer protocol built as an extension to the Secure Shell (SSH) protocol. SFTP only requires one TCP port number. In addition, private and public keys can be used to authenticate users without passwords. However, transfer speeds are slower and consume more system resources due to encryption.
To enable SFTP service:
- Under the SFTP section, tick the Enable SFTP service checkbox.
- Set the port number for the SFTP service.
Note:
- The default port number for the SFTP service is 22. You can set it from 1 to 65535, excluding the following numbers: 20, 21, 23, 25, 80, 110, 137, 138, 139, 143, 199, 443, 445, 515, 543, 548, 587, 873, 993, 995, 3306, 3689, 5005, 5006, 5335, 5432, 6881, 7000, 7001, 8000, 8001, 8080, 8081, 9997, 9998, 9999, 80001, 80002, and eMule default ports: 4662 (TCP), 4672 (UDP).
3. Manage advanced FTP settings (optional)
You can also manage various advanced settings, such as enabling speed limit and file transfer logging, enabling anonymous users to access shared folders, or changing users' root home for FTP transfer.
To enable FTP file transfer logging:
- Make sure FTP or SFTP service has been enabled, and then click Advanced Settings under the General section.
- Tick Enable FTP file transfer log to record the logs of downloaded or uploaded files.
Note:
- Enabling FTP file transfer logging may affect system performance.
To create a root directory change rule:
- Make sure FTP or SFTP service has been enabled, and then click Advanced Settings under the General section.
- Tick Change user root directories and click Select User. In the pop-up window, click Add.
- In User or group, select the item to which this rule will be applied.
- Select which root directory will be available upon user login. Choose one of the following:
- User home: Users arrive at their home directory after logging in.
- Shared folder: Choose a shared folder as the root directory and click Select. Please note that the folder permissions for the user should be checked first. A user with insufficient folder permissions will be unable to log in.
- Click OK.
- After all the rules are added, click Apply to save the settings. This way, the selected users can only access the specified folders when they log into SRM via FTP.
Note:
- Rules are prioritized according to their positions on the list.
- Drag-and-drop to reorder the rules in the list.
To enable anonymous FTP access:
- Make sure FTP or SFTP service has been enabled, and then click Advanced Settings under the General section.
- Tick Enable Anonymous FTP to allow anyone to log into Synology Router device's FTP service (with the anonymous or ftp account) and access specified shared folders.
- You can also tick Change Anonymous root, and select a shared folder from the drop-down menu to change anonymous FTP user's login directory.
To apply default UNIX permissions:
- Make sure FTP or SFTP service has been enabled, and then click Advanced Settings under the General section.
- Tick Apply default UNIX permissions. The permissions will be applied when the system is uploading or creating files and folders. Applied permissions are the same as permissions applied by the UNIX command umask. When this option is enabled, UNIX permissions are 644 for files and 755 for folders. When this option is disabled, UNIX permission is 666 for files and 777 for folders. The default umask value is 022.
Note:
- Enabling this option might cause inconsistent permission issues between different protocols. To avoid inconsistencies, we suggest leaving this option disabled.
To set speed limits for FTP data transfer:
- Make sure FTP or SFTP service has been enabled.
- Under the General section, determine whether you wish to set speed limits, and whether you wish to implement such speed limits at specific periods of time only. This is a server-wide setting and will override the settings of individual users.
Note: Selecting No speed limit will disable the speed limit settings for all users.
- Click Speed Limit Settings to edit the settings for individual users. For each user, you can select one of the following:
- None: No speed limit will be applied when users transfer files with the service.
- Constant: A fixed, constant speed limit will be applied to the user. Upload and download speed limits can be specified in the fields to the left.
- Variable: Two different speed limits can be specified and applied to the user according to a schedule. Click the Customize button to modify the speed limit settings and set a schedule.
- Click Apply to save the settings. This way, the maximum usable bandwidth for specific users transferring files via FTP will be controlled according to the speed limit specified above.