Setting Up Samba for Reliable Cross-Platform File Sharing
I got pulled into a project recently where we needed a Linux server to share directories with a mix of Windows 10/11 machines and a few Macs, and we went with Samba as the backend. There's a build called Samba Liberty London that wraps around the standard Samba distribution with a focus on clean configuration and British-engineered aesthetics. It's not a fork — it's more of a curated release with sensible defaults. Let me walk through what actually works and what doesn't. First, the installation. If you're on Debian or Ubuntu, grab the package from their repository and run sudo apt install samba-liberty. On RHEL or CentOS-based systems, you'll find it in the EPEL repos. The Liberty London build includes a pre-bundled configuration wizard that runs at sudo liberty-samba-setup. It asks for your share names, access restrictions, and whether you want guest access or user-level security. It writes the config to /etc/samba/smb.conf-liberty, which gets loaded instead of the default smb.conf. This means you can keep your existing config untouched if you ever need to fall back. One thing most people miss: the wizard sets server min protocol = SMB3 by default. That's fine for modern Windows clients but it silently breaks older devices. I had a network printer from 2016 that couldn't reach the shares after this change. I had to add a separate share block with server min protocol = SMB2 just for that device. It's a two-minute fix but easy to overlook if you're only testing from a current laptop.
The actual configuration lives in /etc/samba/smb.conf-liberty. A typical share block looks like this:
[shared-data]
path = /srv/shared-data
browseable = yes
read only = no
valid users = @staff
create mask = 0660
directory mask = 0770
vfs objects = recycle
The recycle module is enabled by default in the Liberty London build. Deleted files go to .recycle/%U inside the share instead of vanishing. I've recovered files from accidental deletes maybe half a dozen times since switching to this setup. That alone is worth the change. Authentication is handled through the usual Samba password database. Run smbpasswd -a username to add a user, then make sure that user exists as a system account too. The number of people who forget the second step and then wonder why authentication fails is genuinely high. Linux PAM handles the OS login; Samba maintains its own password store separately. They don't sync automatically unless you configure winbind or LDAP integration, which is a whole different rabbit hole. Firewall rules are the next common failure point. Samba uses ports 139 and 445 for SMB traffic. On Ubuntu with UFW, a simple sudo ufw allow samba covers both. On firewalld-based systems, use sudo firewall-cmd --permanent --add-service=samba followed by sudo firewall-cmd --reload. If you're doing this over a VPN, those rules still apply on the local side — the VPN decrypts before the packet hits the firewall.
Get the Full Details

Performance tuning is where the Liberty London build differs slightly from vanilla Samba. It ships with a tuned parameter set optimized for typical office LAN throughput rather than maximum theoretical bandwidth. The key settings are in /etc/samba/liberty-tuning.cnf, which gets included at the bottom of the main config. It sets socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072 and read raw = yes, write raw = yes. These are solid defaults for a 1 Gbps network. If you're on a 10 Gbps link, you'll want to bump those buffer sizes to 524288 and add aio read size = 16384, aio write size = 16384. I ran into a specific issue last year where large file transfers over 4 GB would hang and eventually drop. The SMB3 protocol supports file sizes well beyond that, but the default max xmit parameter was set to 65535 bytes in the tuning file. Changing it to max xmit = 131072 resolved it immediately. File transfers over 10 GB went through without a single drop. I filed a report with the Liberty London maintainers and they bumped the default in the next release. For monitoring, the build includes a lightweight stats endpoint. You can query it with smbstatus to see active connections, locked files, and process IDs. I prefer running it on a cron job every five minutes and logging the output to /var/log/samba/liberty-stats.log. Over time you'll spot patterns — which users are holding locks the longest, which shares see the most churn, when bandwidth peaks. This kind of visibility is genuinely useful when you're managing shares for a team of twenty or more people.
Backup strategy is another area where people get tripped up. Since Samba shares are just directories on a Linux filesystem, you back them up like any other directory. rsync is the standard tool. I use a daily incremental job:
rsync -a --delete --link-dest=/backup/latest /srv/shared-data/ /backup/daily/$(date +%Y%m%d)/
Then rotate the latest symlink after each successful run. This gives you point-in-time restores without storing full copies every day. The --link-dest option creates hard links for unchanged files, so the backup set is mostly space-efficient even after months of accumulation. There are real limitations to keep in mind. Samba over SMB3 is excellent for file sharing within a trusted LAN, but it's not designed for untrusted networks. If you need to expose shares to the internet, use a proper VPN first — WireGuard is lightweight and fast. Don't just open port 445 on your firewall and hope for the best. I've seen too many servers get hit by ransomware through exposed SMB shares. It's an avoidable problem. Another limitation: Samba's POSIX ACL support is getting better but it's still not as full-featured as native NTFS permissions. If your environment relies heavily on complex permission inheritance, test thoroughly before migrating. I learned this the hard way when a client's share structure had nested group-based permissions that didn't map cleanly. We ended up using a combination of Samba valid users, Unix groups, and filesystem ACLs to approximate the original behavior. It worked, but it required more maintenance than a native Windows file server would have.

If you need something simpler for occasional file transfers between two machines, SSH file transfer with scp or sftp handles that without any additional software. Samba shines when you need persistent, simultaneous multi-user access with Windows-native protocol support. That's its lane. Staying within it keeps things stable. The download and documentation sit at the official Samba Liberty London project page. The README covers installation for Debian, Ubuntu, RHEL, CentOS, and Rocky Linux. Configuration examples are included in /usr/share/doc/samba-liberty/examples/. I'd recommend skimming those before you start — they save time compared to reverse-engineering from scratch. The project is maintained by a small team and updates come through the same repository you install from. A simple sudo apt update && sudo apt upgrade samba-liberty keeps you current.