Created
August 20, 2017 20:43
-
-
Save mguentner/179be5d2b560fafe03537d7d47fb3fd6 to your computer and use it in GitHub Desktop.
nix config for anonymous ftp with pure-ftpd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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