Userland ProFTPD
Please be aware Upload quota will be used when using ProFTPD to download from your slot.
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.
Acquire Absolute path for FTP Root Folder
You will need to find your absolute path to the folder you wish to use for other users. Navigate to the folder with cd ~/path/to/folder
then run the command pwd -P
Keep this path to one side as this is required for the FTP Root Folder
Input during installation
Please use the absolute path starting with /homeXX/ and not just `/home/`. Failing to do so will grant the ProFTPD user access to all directories on your service.
Installation
- Run the following command to download the script and make it executable.
wget https://scripts.usbx.me/main/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.
ultradocs@lw816:~$ ./proftpd-install.sh
Disclaimer: This installer is unofficial, and Ultra.cc staff will not support any issues with it
Type confirm if you wish to continue: confirm
FTP Root Folder: /home12/ultradocs/files
Installing ProFTPD...
Configuring Authentication...
Username: ultradocs
Password: ********
ftpasswd: using alternate file: /home12/ultradocs/.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 = Ultra, CN = chaos.usbx.me
Getting Private key
Starting ProFTPD...
Downloading Scripts...
Cleaning Up...
Done!
Access your ProFTPD installation at ftp://chaos.usbx.me:32563
Run ./proftpd-uninstall.sh to uninstall | Run ./proftpd-users.sh to manage users
Be sure to take note of the port provided by the script in this line: Access your ProFTPD installation at ftp://chaos.usbx.me:32563.
Managing Users
- To manage users, run the following command
./proftpd-users.sh
- You should see the following output below. Follow the instructions shown.
ultradocs@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
then run the commandpwd -P
this will display a path similar to/
home/home12/ultradocs/files - You can change the limited commands by replacing ALL with specific commands or groups of commands as listed on ProFTPD's <Limit> documentation.
- You can also add subdirectories by copying the entire block and changing
/
tohome/home12/ultradocs/files>/
where the directory is the subdirectory you want to modify permissions.home/home12/ultradocs/files/directory> - Shown here is a permissions example
# Permissions example
<Limit ALL>
# Limit everything
DenyAll
</Limit>
<Directory /home/home12/ultradocs/files>
# Allow everyone inside this folder
<Limit ALL>
AllowAll
</Limit>
</Directory>
<Directory /home12/ultradocs/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
Connection Example
Protocol: FTP - File Transfer Protocol
Host: server.usbx.me
Port: Provided by Install Script
Encryption: Require explicit FTP over TLS
User: As set by /proftpd-users.sh
Pass: /proftpd-users.sh
Update Expired Certificates
- First run the following commands, one line at a time, to stop Userland ProFTPD and backup your original certificates
systemctl --user stop proftpd.service
mkdir ~/.config/proftpd/old-cert-backup
mv ~/.config/proftpd/{server.crt,server.key} ~/.config/proftpd/old-cert-backup/
- Then run the folloowing commands, one line at a time, to generate your new certificates
openssl genrsa -out ~/.config/proftpd/server.key 1024
openssl req -new -key ~/.config/proftpd/server.key -out ~/.config/proftpd/server.csr -subj "/C=NL/ST=NH/L=Amsterdam/O=Ultra/CN=$(hostname).usbx.me"
openssl x509 -req -days 365 -in ~/.config/proftpd/server.csr -signkey ~/.config/proftpd/server.key -out ~/.config/proftpd/server.crt
- Finally, restart your Userland ProFTPD with the following SSH command
systemctl --user start proftpd.service