ThisCalculator

Everyday

Install FTP Server & Map Directories in Zentyal PDC

Updated · Standard formula, shown below

This guide explains how to install an FTP server on a Zentyal Primary Domain Controller (PDC) and map its directories so users can access shared files over the network. You will learn the exact steps to enable the FTP module, configure user/group access, and map the FTP root to a network drive on Windows clients.

Background: Why Use FTP on a Zentyal PDC?

Zentyal is a Linux-based server distribution that integrates Samba, LDAP, and other services into a single web-administered platform. When configured as a PDC, it manages domain users, groups, and shared folders. Adding FTP extends file access beyond the traditional SMB protocol, which is useful for:

  • Allowing remote users to upload/download files without a VPN or Samba client.
  • Providing a simple, cross-platform method for file transfer (Windows, macOS, Linux, mobile).
  • Integrating with web applications or automated backups that rely on FTP.

The FTP service in Zentyal is built on ProFTPD and integrates with the same LDAP user database, so domain credentials work seamlessly.

How Zentyal’s FTP Module Works

Zentyal’s FTP module uses the system’s LDAP directory to authenticate users. When you enable the FTP module, it configures ProFTPD to use LDAP for authentication and sets the default FTP root to each user’s home directory (e.g., /home/users/username). You can override this per user or per group via the Zentyal dashboard.

Directory mapping, in this context, means associating a specific FTP path (like /srv/ftp/shared) with a share that users can access. This is done by setting the FTP root for a user or group to that path, or by creating a symbolic link from the user’s home to the shared directory.

Step-by-Step: Installing and Configuring FTP

  1. Log in to the Zentyal web interface as an administrator (e.g., admin).
  2. Go to Software Management → Zentyal Components and search for FTP.
  3. Click Install next to the FTP component. Wait for the installation to complete.
  4. Go to FTP in the left menu. You’ll see the main configuration page.
  5. Check Enable FTP service and set the Port (default 21). You may also enable FTPS (FTP over SSL) for security.
  6. Click Save Changes and then Apply Changes to commit the configuration.

After these steps, FTP is running, but you still need to define which directories users can access.

Mapping FTP Directories to User/Group Home Directories

By default, each user’s FTP root is their home directory. To map a different directory (e.g., a shared folder) for a user or group:

  1. In the Zentyal dashboard, go to Users and Computers.
  2. Select a user or group, then click Edit.
  3. In the FTP tab, you’ll see a field for FTP root. Enter the absolute path to the directory you want to be the FTP root for that user/group.
  4. Make sure the user/group has read/write permissions on that directory. You can set permissions via the File Sharing module (Samba) or directly on the Linux filesystem.
  5. Click Save and then Apply Changes.

For example, if you have a shared folder at /srv/ftp/shared, set the FTP root of the sales group to that path. Then all members of sales will land in that folder when they connect via FTP.

Connecting and Mapping FTP as a Network Drive on Windows

Once FTP is configured, users can connect using any FTP client (FileZilla, WinSCP, or the command line). To map the FTP directory as a network drive in Windows Explorer:

  1. Open File Explorer and right-click on This PC → Map network drive.
  2. Choose a drive letter.
  3. In the Folder field, enter the FTP address in the format: ftp://server-ip-or-hostname (e.g., ftp://192.168.1.10).
  4. Check Connect using different credentials if you’re not logged in as the domain user.
  5. Click Finish. Enter the domain username and password when prompted.

Windows will mount the FTP root as a drive letter. Note that Windows maps FTP as a “shortcut” drive, not a true network drive like SMB, so some operations (like offline caching) may not work.

Common Problems and Fixes

  • FTP service not starting: Check if the port 21 is already in use. Run sudo netstat -tulpn | grep :21 on the server. If another service is using it, stop it or change the FTP port in Zentyal.
  • Login fails for domain users: Ensure the FTP module is using LDAP authentication. In Zentyal, the module should automatically use LDAP, but if you manually edited ProFTPD config, verify the AuthOrder includes mod_ldap.c.
  • Permission denied when uploading: The FTP user must have write permission on the target directory. Use sudo chmod -R 775 /path/to/dir and ensure the user is in the correct group.
  • Cannot see shared directory in FTP root: If you set a custom FTP root, make sure the directory exists and is accessible. You can create a symbolic link: sudo ln -s /srv/ftp/shared /home/users/username/shared.

Security Considerations

FTP transmits credentials and data in plain text by default. For any production environment, enable FTPS (FTP over TLS) in Zentyal. Go to FTP → Configuration and check Force FTPS. You’ll need to generate or upload an SSL certificate. Also, consider restricting FTP access to specific IP ranges via the Firewall module to reduce exposure.

Alternatives to FTP

If FTP doesn’t meet your needs, Zentyal also supports:

  • Samba (SMB) – native Windows file sharing, better for domain environments, supports file locking and group policies.
  • WebDAV – accessible over HTTPS, good for web-based file access.
  • SSH/SFTP – more secure than FTP, but requires SSH access.

Choose based on your client base and security requirements.

Frequently Asked Questions

How do I change the default FTP port in Zentyal?

In the Zentyal dashboard, go to FTP → Configuration, change the Port field, save and apply changes. Remember to update your firewall rules if you have any.

Can I use the same credentials for FTP and Windows login?

Yes, because FTP uses the same LDAP database as Samba. Users log in with their domain username and password.

Why can’t I see the FTP drive in Windows after mapping?

Windows maps FTP as a “network location” not a drive. It may not appear under “This PC” immediately; check under “Computer” or “Network locations”. If it doesn’t work, try using a third-party FTP client like FileZilla.

How do I give a user access to a shared FTP folder without changing their home?

Create a symbolic link inside the user’s home directory that points to the shared folder. Or set the user’s FTP root to the shared folder, but that will replace their home directory as the FTP root.

Is FTP secure enough for business use?

Plain FTP is not secure. Enable FTPS (FTP over SSL) or use SFTP instead. Zentyal supports FTPS, and you can also install an SSH server for SFTP.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.