Debian GNU/Linux · Services

Disable file transfer and file sharing server services the system does not provide

When it fails: FTP, TFTP, rsync or Samba servers can run on a system that does not provide them. An unneeded file server exposes data and often sends credentials in clear text.

CB-DEB-SVC-002mediumactiveautomatedautomated fixprofile core

As released in v0.1.0 beta · pre-release. Current state.

Description

File transfer and sharing daemons packaged by Debian:

  • FTP: vsftpd, proftpd (service and socket), pure-ftpd;
  • TFTP: tftpd-hpa, atftpd (service and socket);
  • rsync in daemon mode: rsync;
  • Samba: smbd, nmbd, samba-ad-dc.

The control passes when each unit is masked or not installed at all.

A unit that does not exist counts as compliant, so removing the package is an equally valid fix. The rsync package ships rsync.service disabled; it still fails this control until masked, because any package or administrator can enable it.

Rationale

FTP and TFTP send data, and FTP also passwords, without encryption. TFTP has no authentication at all. rsync and Samba daemons publish directories on the network. Each of them is remotely reachable code and a path for data to leave the system.

Impact

Masking a unit stops it and prevents it from starting again. Client tools are not affected: rsync over SSH and smbclient keep working. File servers must exclude this control in their tailoring file.

Audit

For each unit, run systemctl is-enabled <unit>. It must print masked, or fail because the unit does not exist: vsftpd.service, proftpd.service, proftpd.socket, pure-ftpd.service, tftpd-hpa.service, atftpd.service, atftpd.socket, rsync.service, smbd.service, nmbd.service, samba-ad-dc.service.

Automated: every check must pass. Scanners report each check by its id.

vsftpd

vsftpd FTP server.

unit: vsftpd.service
state: masked

proftpd

ProFTPD FTP server.

unit: proftpd.service
state: masked

proftpd-socket

ProFTPD socket activation.

unit: proftpd.socket
state: masked

pure-ftpd

Pure-FTPd FTP server.

unit: pure-ftpd.service
state: masked

tftpd-hpa

tftp-hpa TFTP server.

unit: tftpd-hpa.service
state: masked

atftpd

atftpd TFTP server.

unit: atftpd.service
state: masked

atftpd-socket

atftpd socket activation.

unit: atftpd.socket
state: masked

rsync

rsync daemon.

unit: rsync.service
state: masked

smbd

Samba file server.

unit: smbd.service
state: masked

nmbd

Samba NetBIOS name server.

unit: nmbd.service
state: masked

samba-ad-dc

Samba Active Directory domain controller.

unit: samba-ad-dc.service
state: masked

Remediation

Stop and mask each unit that is installed: systemctl mask --now <unit>. If the package is not needed at all, remove it instead, for example apt purge vsftpd tftpd-hpa samba.

Restartnone
Disruptionlow

Rollback

Run systemctl unmask <unit> then systemctl enable --now <unit>.

vsftpd

Generated from check vsftpd: the engine writes the fix for every output, it sets the expected value and the check runs again after.

proftpd

Generated from check proftpd: the engine writes the fix for every output, it sets the expected value and the check runs again after.

proftpd-socket

Generated from check proftpd-socket: the engine writes the fix for every output, it sets the expected value and the check runs again after.

pure-ftpd

Generated from check pure-ftpd: the engine writes the fix for every output, it sets the expected value and the check runs again after.

tftpd-hpa

Generated from check tftpd-hpa: the engine writes the fix for every output, it sets the expected value and the check runs again after.

atftpd

Generated from check atftpd: the engine writes the fix for every output, it sets the expected value and the check runs again after.

atftpd-socket

Generated from check atftpd-socket: the engine writes the fix for every output, it sets the expected value and the check runs again after.

rsync

Generated from check rsync: the engine writes the fix for every output, it sets the expected value and the check runs again after.

smbd

Generated from check smbd: the engine writes the fix for every output, it sets the expected value and the check runs again after.

nmbd

Generated from check nmbd: the engine writes the fix for every output, it sets the expected value and the check runs again after.

samba-ad-dc

Generated from check samba-ad-dc: the engine writes the fix for every output, it sets the expected value and the check runs again after.

Each release turns these fixes into remediate.sh and an Ansible role per profile: dry run by default, a fix runs only when its check fails.

References

Mappings

FrameworkIDRelationNote
ANSSI-BP-028 - Recommandations de configuration d'un système GNU/Linux2.0R62partialR62 asks to disable every unneeded service; this control covers file transfer and sharing servers.
NIST SP 800-53 Rev. 55.1.1CM-7partial

How this control relates to the other framework's: equivalent, stricter, looser, partial or related.

Threats mitigated

People and lifecycle

Authors
Verified2026-10-18 by Sn0wAlice on 12, Proxmox VM, Debian 12 genericcloud image, kernel 6.1.0-54-cloud-amd64. Fresh image passes; with vsftpd, tftpd-hpa, rsync and samba installed the checks fail (rsync disabled still fails), fix masks, audit passes after reboot; packages still purge cleanly; SSH reachable.
Verified2026-10-18 by Sn0wAlice on 13, Proxmox VM, Debian 13 genericcloud image, kernel 6.12.113+deb13-cloud-amd64. Fresh image passes; with vsftpd, tftpd-hpa, rsync and samba installed the checks fail (rsync disabled still fails), fix masks, audit passes after reboot; packages still purge cleanly; SSH reachable.
Introduced inv0.1.0
Created, updated2026-10-18, 2026-10-18
Translationsfr