Add: sftp ftpuser config
This commit is contained in:
parent
ee2ba3ddf6
commit
2a3cd04a31
3 changed files with 21 additions and 2 deletions
|
|
@ -8,10 +8,20 @@
|
|||
home = "/srv/ftp/ftpuser";
|
||||
createHome = true;
|
||||
group = "ftpuser";
|
||||
shell = "/usr/sbin/nologin";
|
||||
shell = "/usr/bin/nologin";
|
||||
};
|
||||
users.groups.ftpuser = {};
|
||||
|
||||
services.openssh = {
|
||||
extraConfig = ''
|
||||
Match User ftpuser
|
||||
ChrootDirectory /srv/ftp/ftpuser
|
||||
ForceCommand internal-sftp
|
||||
AllowTcpForwarding no
|
||||
X11Forwarding no
|
||||
'';
|
||||
};
|
||||
|
||||
# -------------------------------------------------
|
||||
# 2️⃣ Permissions du répertoire home (méthode A)
|
||||
# -------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue