Pareto Security
Start for Free

Existing customer? Login

CIS Essentials

File sharing is off

Time to fix

< 1m

What

File sharing services like Samba (SMB/CIFS), NFS, and FTP allow other devices on your network to access files on your Linux system. These services should be disabled when not actively needed to reduce security risks.

Why disable file sharing

File sharing services can expose your files to unauthorized access and are common targets for attackers. They should only be enabled when necessary and properly secured with authentication and access controls.

Check file sharing services

Samba (SMB/CIFS sharing)

Check if Samba is running:

sudo systemctl status smbd nmbd

Disable Samba if not needed:

sudo systemctl stop smbd nmbd
sudo systemctl disable smbd nmbd

NFS (Network File System)

Check if NFS server is running:

sudo systemctl status nfs-server

Disable NFS if not needed:

sudo systemctl stop nfs-server
sudo systemctl disable nfs-server

FTP services

Check for FTP servers (vsftpd, proftpd):

sudo systemctl status vsftpd
sudo systemctl status proftpd

Disable FTP services if not needed:

sudo systemctl stop vsftpd proftpd
sudo systemctl disable vsftpd proftpd

Check all network services

Review all listening network services:

sudo netstat -tlnp
# or
sudo ss -tlnp

Look for services listening on ports like 139, 445 (SMB), 2049 (NFS), 21 (FTP), etc.

Desktop environment file sharing

GNOME

Check GNOME's built-in sharing:

  • Open Settings
  • Navigate to Sharing
  • Ensure File Sharing is turned off
  • Ensure Remote Desktop is turned off
KDE Plasma

Check KDE sharing settings:

  • Open System Settings
  • Go to NetworkSharing
  • Disable any active sharing services

Secure file sharing (if needed)

If you must enable file sharing, secure it properly:

  • Use authentication (no guest/anonymous access)
  • Limit access to specific users and IP addresses
  • Use encrypted protocols when possible (SFTP instead of FTP)
  • Regularly review shared folders and permissions
Secure Alternatives

Consider using cloud storage services, SFTP, or encrypted file transfer tools instead of traditional file sharing protocols for better security.

Network Discovery

Also disable network discovery services like Avahi if you don't need your system to be discoverable on the local network.