[Proftpd-user] sftp and virtual users

[email protected] Fri, 27 Sep 2024 22:02:30 +0200 (CEST)
Newsgroups gmane.network.proftpd.user
Message-ID <[email protected]>
--===============3417781098128236360==
Content-Type: multipart/alternative; 
	boundary="=_c4174c0f-c286-4da9-add8-377b8d57b950"

--=_c4174c0f-c286-4da9-add8-377b8d57b950
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Hello 
I try to make sftp and virtual users working. 
The authentification fails. 

In the proftp.log file : 

2024-09-27 19:47:23,154 srv01 proftpd[1589] 0.0.0.0 (fr-lap873054680.home[192.168.1.10]): mod_auth_file/1.0: using passwd file '/etc/proftpd/ftp.passwd' 
2024-09-27 19:47:23,154 srv01 proftpd[1589] 0.0.0.0 (fr-lap873054680.home[192.168.1.10]): retrieved UID 1000 for user 'test' 

1000 is the id assigned to the virtual user : 

root@srv01:/etc/proftpd# cat ftp.passwd 
test:$5$elNsDLsNJaEmZOEm$tYj951K1izy9E0ZrwFTh13cMzcMLvqXg6BHQUjiuj5B:1000:1000::/tmp:/bin/false 

in the auth.file trace : 

2024-09-27 19:47:10,896 [1588] <auth.file:8>: no AuthUserFile configured 
2024-09-27 19:47:10,908 [1588] <auth.file:8>: no AuthGroupFile configured 

it's contradictory : 
The first log indicates proftpd can read the file 
the second indicates proftpd can not read the file 

Extract of the proftpd configuration file : 

AuthFileOptions SyntaxCheck 
AuthUserFile /etc/proftpd/ftp.passwd 
AuthOrder mod_auth_file.c 

the sftp config file : 

<IfModule mod_sftp.c> 
<VirtualHost 0.0.0.0> 
SFTPEngine on 
Port 2222 
SFTPLog /var/log/proftpd/sftp.log 
RequireValidShell off 
AuthFileOptions SyntaxCheck 
AuthOrder mod_auth_file.c 
AuthUserFile /etc/proftpd/ftp.passwd 
AuthGroupFile /etc/proftpd/group 
SFTPHostKey /etc/ssh/ssh_host_rsa_key 
SFTPCompression delayed 
</VirtualHost> 
</IfModule> 

Thanks. 

David. 

--=_c4174c0f-c286-4da9-add8-377b8d57b950
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><body><div style=3D"font-family: arial, helvetica, sans-serif; font-s=
ize: 12pt; color: #000000"><div>Hello<br>I try to make sftp and virtual use=
rs working.<br>The authentification fails.<br><br>In the proftp.log file :<=
/div><div><br>2024-09-27 19:47:23,154 srv01 proftpd[1589] 0.0.0.0 (fr-lap87=
3054680.home[192.168.1.10]): mod_auth_file/1.0: using passwd file '/etc/pro=
ftpd/ftp.passwd'<br>2024-09-27 19:47:23,154 srv01 proftpd[1589] 0.0.0.0 (fr=
-lap873054680.home[192.168.1.10]): retrieved UID 1000 for user 'test'<br><b=
r>1000 is the id assigned to the virtual user :<br><br>root@srv01:/etc/prof=
tpd# cat ftp.passwd <br>test:$5$elNsDLsNJaEmZOEm$tYj951K1izy9E0ZrwFTh13cMzc=
MLvqXg6BHQUjiuj5B:1000:1000::/tmp:/bin/false<br><br>in the auth.file trace =
:<br><br>2024-09-27 19:47:10,896 [1588] &lt;auth.file:8&gt;: no AuthUserFil=
e configured<br>2024-09-27 19:47:10,908 [1588] &lt;auth.file:8&gt;: no Auth=
GroupFile configured<br><br>it's contradictory :<br>The first log indicates=
 proftpd can read the file<br>the second indicates proftpd can not read the=
 file<br><br>Extract of the proftpd configuration file :<br><br>AuthFileOpt=
ions SyntaxCheck<br>AuthUserFile /etc/proftpd/ftp.passwd<br>AuthOrder mod_a=
uth_file.c<br><br>the sftp config file :<br><br>&lt;IfModule mod_sftp.c&gt;=
<br>&lt;VirtualHost 0.0.0.0&gt;<br>SFTPEngine&nbsp;&nbsp;&nbsp;&nbsp; on<br=
>Port&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2222<br>S=
FTPLog&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /var/log/proftpd/sftp.log<=
br>RequireValidShell off<br>AuthFileOptions SyntaxCheck<br>AuthOrder mod_au=
th_file.c<br>AuthUserFile /etc/proftpd/ftp.passwd<br>AuthGroupFile /etc/pro=
ftpd/group<br>SFTPHostKey /etc/ssh/ssh_host_rsa_key<br>SFTPCompression dela=
yed<br>&lt;/VirtualHost&gt;<br>&lt;/IfModule&gt;<br><br>Thanks.<br><br>Davi=
d.</div></div></body></html>
--=_c4174c0f-c286-4da9-add8-377b8d57b950--


--===============3417781098128236360==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============3417781098128236360==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ProFTPD Users List   <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html
--===============3417781098128236360==--