Skip to content

Instantly share code, notes, and snippets.

@mguentner
Created August 20, 2017 20:43
Show Gist options
  • Save mguentner/179be5d2b560fafe03537d7d47fb3fd6 to your computer and use it in GitHub Desktop.
Save mguentner/179be5d2b560fafe03537d7d47fb3fd6 to your computer and use it in GitHub Desktop.
nix config for anonymous ftp with pure-ftpd
{
systemd.services.pure-ftpd = {
description = "PureFTPD Server";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
# -e only Anon -M allow Dirs
ExecStart = "${pkgs.pure-ftpd}/bin/pure-ftpd -e -M -p 30000:50000";
Type = "simple";
};
};
users.extraGroups.ftp.gid = config.ids.gids.ftp;
users.extraUsers.ftp = {
uid = config.ids.uids.ftp;
group = "ftp";
description = "Anonymous FTP user";
home = "/mnt/data/public/upload";
};
networking.firewall.allowedTCPPortRanges = [ { from = 30000; to = 50000; } ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment