Creating FTP Users in Virtualmin and Configuring Folder Access

Prerequisites

  • Virtualmin Access: Administrative access to the Virtualmin panel.
  • FTP Server Configured: Virtualmin typically uses ProFTPD or vsftpd. Ensure it’s installed and running.
  • Domain Configured: The domain/website must be set up in Virtualmin.

Step-by-Step Guide

1. Log in to Virtualmin

Access the Virtualmin panel with admin credentials and select the desired domain from the dropdown menu in the top-left corner. Check ACCESS section of the desired domain.

2. Create an FTP User

  1. Go to the Users Section:
    • In the sidebar, click Edit Users or Edit Mail/FTP Users (depending on your Virtualmin version).
  2. Add a New User:
    • Click Add a User.
    • Fill in the details:
      • Username: FTP user’s name (e.g., ftpuser1).
      • Password: Set a strong password.
      • Home Directory: Specify the folder (e.g., /home/domain/public_html/ftpuser1). Virtualmin can create it if it doesn’t exist.
      • Quota: Set a storage limit if needed.
      • Enable FTP Access: Check this option.
    • Leave other settings as default unless specific configurations are needed.
  3. Save:
    • Click Create to finalize.

3. Configure Access to Specific Folders

By default, the user is restricted to the Home Directory. To customize access:

  1. Edit the User:
    • Go to Edit Users, select the user, and click Edit.
    • Change the Home Directory if needed.
  2. Folder Permissions:
    • Use the File Manager in Virtualmin:
    • Navigate to the folder (e.g., /home/domain/public_html/ftpuser1).
    • Right-click and select File Permissions.
    • Set the owner to the FTP user (e.g., ftpuser1) and adjust permissions (e.g., 700 for exclusive access).
  3. Restrict Access:
    • Ensure the FTP server uses chroot to lock the user to their home directory.
    • Check in Webmin > Servers > ProFTPD > Files and Directories and enable chroot jail.

4. Test FTP Access

  1. Use an FTP client like FileZilla or WinSCP.
  2. Configure the connection:
    • Host: Server IP or domain (e.g., yourdomain.com).
    • Username: The created user (e.g., ftpuser1).
    • Password: The set password.
    • Port: 21 (default for FTP).
  3. Connect and verify access is limited to the configured folder.

5. Create Multiple Users with Access to Different Folders

Repeat the process for each user, changing:

  • The username (e.g., ftpuser2).
  • The home directory (e.g., /home/domain/public_html/ftpuser2).
  • Folder permissions to ensure exclusive access.

For further assistance, consult Virtualmin documentation or contact support.

Categories: SSH / sFTP / FTP
thumb-up thumb-down