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