Fixing vsftpd without anonymous users, adding localUsers, and creating chroot path.

Author:    viric @ rev 14286

svn path=/nixos/branches/fix-style/; revision=14446
This commit is contained in:
Nicolas Pierron 2009-03-07 18:01:42 +00:00
parent 02ed3f12ed
commit c887a5be1e
1 changed files with 9 additions and 1 deletions

View File

@ -20,6 +20,13 @@ let
Whether to enable the anonymous FTP user.
";
};
localUsers = mkOption {
default = false;
description = "
Whether to enable FTP for the local users.
";
};
writeEnable = mkOption {
default = false;
@ -50,7 +57,7 @@ in
let
inherit (config.services.vsftpd) anonymousUser writeEnable anonymousUploadEnable anonymousMkdirEnable;
inherit (config.services.vsftpd) anonymousUser localUsers writeEnable anonymousUploadEnable anonymousMkdirEnable;
inherit (pkgs) vsftpd;
yesNoOption = p : name :
@ -99,6 +106,7 @@ mkIf config.services.vsftpd.enable {
start script
cat > /etc/vsftpd.conf <<EOF
${yesNoOption anonymousUser "anonymous_enable"}
${yesNoOption localUsers "local_enable"}
${yesNoOption writeEnable "write_enable"}
${yesNoOption anonymousUploadEnable "anon_upload_enable"}
${yesNoOption anonymousMkdirEnable "anon_mkdir_write_enable"}