Userland ProFTPD
ProFTPD is a server that can offer FTP access to friends and family without revealing your slot's username and password. Instead, custom usernames and passwords can be set for each friend or family member.
In this section, we'll be installing and setting up Userland ProFTPD into your slot. We'll also be teaching you how to manage and uninstall ProFTPD.
Installation
- Run the following command to download the script and make it executable.
wget https://raw.githubusercontent.com/ultraseedbox/Ultraseedbox-Scripts/master/ProFTPD/proftpd-install.sh
chmod +x proftpd-install.sh
- Run the script by running the following
./proftpd-install.sh
- Then, you'll see the following output. Enter what is needed.
- You may need to use your full home path for
FTP Root Folder: ~/files
to do so navigate to the directory you wish to share withcd ~/files
and typepwd
this will display a path similar to/home12/usbdocs/files
- You may need to use your full home path for
usbdocs@lw816:~$ ./proftpd-install.sh
Disclaimer: This installer is unofficial, and USB staff will not support any issues with it
Type confirm if you wish to continue: confirm
FTP Root Folder: /home/user/files
Installing ProFTPD...
Configuring Authentication...
Username: usbdocs
Password: ********
ftpasswd: using alternate file: /home12/usbdocs/.config/proftpd/proftpd.passwd
ftpasswd: creating passwd entry for user usbdocs
ftpasswd: entry created
Do you want to create another user? (y/n) n
Installing Service...
Configuring TLS...
Generating RSA private key, 1024 bit long modulus (2 primes)
...............+++++
.................+++++
e is 65537 (0x010001)
Signature ok
subject=C = NL, ST = NH, L = Amsterdam, O = Ultraseedbox, CN = lw816.usbx.me
Getting Private key
Starting ProFTPD...
Downloading Scripts...
Cleaning Up...
Done!
Access your ProFTPD installation at ftp://lw816.usbx.me:32563
Run ./proftpd-uninstall.sh to uninstall | Run ./proftpd-users.sh to manage users
Managing Users
- To manage users, run the following command
./proftpd-users.sh
- You should see the following output below. Follow the instructions shown.
usbdocs@lw816:~$ ./proftpd-users.sh
What do you want to do?
1) Create a user
2) Delete a user
3) Change a user's password
4) Exit
Select an option:
Setting Permissions
- By default, ProFTPD will allow all created users access to the FTP root directory and all subdirectories.
- By setting up permissions, you can limit their access to only specific directories that you defined as their home.
- In ProFTPD,
~
is the FTP user's home directory. This can be different from your actual home directory. - The following additional configuration will allow all FTP users full access to their FTP home directory.
- You can edit this by running your fave text editor
nano .config/proftpd/proftpd.conf
<Directory ~>
<Limit ALL>
AllowAll
</Limit>
</Directory>
- You may need to use your full home path for permissions to apply to do so navigate to the directory you wish to share with
cd ~/path/to/folder
and typepwd
this will display a path similar to/home12/usbdocs/files
- You can change the limited commands by replacing ALL with specific commands or groups of commands as listed on ProFTPD's
documentation . - You can also add subdirectories by copying the entire block and changing
/home12/usbdocs/files>
to/home12/usbdocs//files/directory>
where the directory is the subdirectory you want to modify permissions. - Shown here is a permissions example
# Permissions example
<Limit ALL>
# Limit everything
DenyAll
</Limit>
<Directory /home12/usbdocs/files>
# Allow everyone inside this folder
<Limit ALL>
AllowAll
</Limit>
</Directory>
<Directory /home12/usbdocs/files/test1>
# Allow "test1" inside this folder and all other users will be denied
<Limit ALL>
Order Allow,Deny
AllowUser test1
Deny ALL
</Limit>
</Directory>
- Restart ProFTPD for the configuration changes to take effect.
systemctl --user restart proftpd
Troubleshooting Information
Why is my FTP not logging in?
This largely depends on the response of the FTP server. Here are some of the common errors and how to fix them.
Response: - 530 Non-anonymous sessions must use encryption.
Plain FTP is not supported at Ultra. You must connect over the following:
- Explicit TLS over port 21
- Explicit Auth SSL over port 21
- SFTP/SSH2 protocol over port 22
We have a help document to provide more in-depth help here.
Response: [SFTP] Status: Access denied or [FTP] Response: 530 Login incorrect.
This usually means your password is either.
- not set or;
- is no longer valid in your UCP's access details due to technical issues or announcements.
We have an extensive guide for this here.
Response: ERRCONN REFUSED, or Connection Refused
The server's fail2ban has been triggered due to too many invalid authentication attempts in a period. It restricts your IP address from logging in until that period is expired.
You will need to wait 10 minutes before trying again.
How to resolve slow FTP download speed issues?
This usually is caused by our servers' route to your ISP is not optimal and needs a reroute.
In that case, you may visit the following guides:
- NovoServe [LW8XX] - Using NovoServe Rerouting Tool
- YISP [LW9XX] - Using the YISP Rerouting Tool.
Another common issue is that if you have a Windows 10 PC, the Receive Window Auto-Tuning Level setting in netsh
is set improperly. Windows usually reset this during OS upgrades.
Try running netsh interface tcp show global
using Command Prompt or PowerShell running in Administrator mode. You should see the following settings.
PS C:\Windows\system32> netsh interface tcp show global
Querying active state...
TCP Global Parameters
----------------------------------------------
Receive-Side Scaling State : enabled
Receive Window Auto-Tuning Level : normal
Add-On Congestion Control Provider : default
ECN Capability : disabled
RFC 1323 Timestamps : disabled
Initial RTO : 1000
Receive Segment Coalescing State : enabled
Non Sack Rtt Resiliency : disabled
Max SYN Retransmissions : 4
Fast Open : enabled
Fast Open Fallback : enabled
HyStart : enabled
Proportional Rate Reduction : enabled
Pacing Profile : off
Receive Window Auto-Tuning Level should be set to normal, but some clients have better results by switching from **normal **to experimental. To do that, run the following command:
netsh int tcp set global autotuninglevel=experimental
The **experimental **option can give you full download speeds. Please make sure that you do a reboot before testing.
To go back to the default, run the following command:
netsh int tcp set global autotuninglevel=normal
Another cause of this is the use of VPNs. There are chances that the VPN is throttling your speeds, so make sure you disable your VPN connection whenever you download your files from your slot.
Another possible reason is that your disk has very high IO utilization. To check, run this command in your shell and pay attention to the last column named %util.
iostat -xk 2 $(findmnt -T ~ | awk 'END {print $2}')
If this is 100%, the disk you're in is entirely saturated, affecting your apps' performance. You may need to send a ticket to our support system so the Ultra.cc team can investigate.
I need plain FTP. Is there any way to use it?
Plain FTP is not supported on our slots due to our commitments to security and privacy for our clients.
However, should you really need plain FTP and you fully know the risks, you may install userland ProFTPD in your userspace.
Please see this help document for the installation of userland ProFTPD here.
Then, once you finished installing and setting up roFTPD, you will need to edit ~/.config/proftpd/proftpd.conf
and change TLSRequired on to TLSRequired off using a text editor.
After that, run systemctl --user restart proftpd
to reflect the changes in Userland ProFTPD.
Logging in with the username/password combo you created during the install will now be unencrypted.
Why does the FTP connection keep disconnecting with Error: "Disconnect after 20 seconds of inactivity"?
Most FTP clients create new threads when transferring files. All this means is that your original Connection has timed out for being idle for too long.
If you're having latency issues, then it's likely you will also experience this error too.
Some of my files have duplicates in ~/files
or ~/Downloads
directory and ~/media
directory. Are they using double disk space?
If you're using Radarr/Sonarr/Sickchill/CouchPotato/Medusa etc., they should not be taking any additional space. By default, these applications create a hardlink of the media file to the default root directory of your application from the path that your Torrent client stores your original downloaded files with. A hard link can be described as a single file located at two different paths but pointing at the same block of data on the disk. Think of it as two signposts from other streets that direct you to the same destination. Hardlinks do not take any extra space. You can compare the inode numbers for both files from the Terminal (SSH access) with ls -I
on both files'. The inode number will be the same.
Hardlinks allows your torrent client to continue seeding while having a "link file" on your media folder neatly arranged. If you wish to delete a file altogether that has a hardlink, you may need to delete both the files from your Torrent Client and on your media folder.
You can read more about Hard Links here: https://en.wikipedia.org/wiki/Hardlink.