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 will be installing and setting up Userland ProFTPD into your slot. We'll also be teaching you how to manage and uninstall ProFTPD.
Initial Setup
- Connect to your Ultra.cc service via SSH.
Prepare FTP Root Folder
You need to select a root folder for your ProFTPD server and take note of its absolute path, as you will need it while configuring the FTP server. To do so, follow the below steps.
- Navigate to a folder of your choice with the following command:
cd ~/path/to/folder- Then, execute the following command to see the absolute path.
pwd -P- You should see the command output the absolute path in the format of
/homeXX/username/path/to/folder, wherehomeXXandusernamewill be unique to your Ultra.cc service. - Take note of the absolute path, as it is what you will input as the FTP Root Folder while installing ProFTPD.
Installation
- Execute the following command to download the script.
wget -P ~ https://scripts.ultra.cc/main/ProFTPD/proftpd-install.sh- Next, make the script executable with the following command:
chmod +x ~/proftpd-install.sh- Run the script by executing the following command:
~/proftpd-install.sh- Then, you will see the following output. Enter what is needed.
Usage
Manage Users
- To manage users, run the following command
~/proftpd-users.sh- You should see the following output below. Follow the instructions shown.
ultradocs@spica:~$ ~/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:Set 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/folderthen run the commandpwd -Pthis will display a path similar to/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
/home12/ultradocs/files>to/home12/ultradocs/files/directory>where the directory is the subdirectory you want to modify permissions. - Shown here is a permissions example
- Restart ProFTPD for the configuration changes to take effect.
systemctl --user restart proftpdConnection 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.shUpdate 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.servicemkdir ~/.config/proftpd/old-cert-backupmv ~/.config/proftpd/{server.crt,server.key} ~/.config/proftpd/old-cert-backup/- Then run the following commands, one line at a time, to generate your new certificates
openssl genrsa -out ~/.config/proftpd/server.key 1024openssl 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 command.
systemctl --user start proftpd.serviceIf you require further assistance, you can open a support ticket here!
Feedback and suggestions regarding this article are welcome on our Discord server
- Userland ProFTPD
- Initial Setup
- Prepare FTP Root Folder
- Installation
- Usage
- Manage Users
- Set Permissions
- Connection Example
- Update Expired Certificates