Je me suis mal exprimé.
J’avais ouvert une fenêtre de terminal root en local. Root étant dans la liste ftpusers (pourquoi ce nom ?), il se rabat sur un autre compte.
Sinon, pour lancer ProFTPd, il faut lancer ProFTPd en root. ProFTPd abandonne ensuite ces droits théoriquement pour revenir à l’utilisateur spécifié avec les directives User et Group. Je dis théoriquement car le process reste root.
Quand je parlais de local, c’était via localhost, distant via Lan.
J’ai revu configuration, cette
non-root@server_name:/$ ftp localhost
Connected to localhost.
220 server_name
Name (localhost:non-root): cpte_ftpasswd
331 Mot de passe requis pour cpte_ftpasswd
Password:
530 Authentification incorrecte.
Login failed.
421 Service not available, remote server has closed connection
ftp>
Voici donc le fichier de configuration :
[code]ServerType standalone
DefaultServer on
Umask 022
ServerName "ftp.xxx.xx"
ServerIdent on "xxxxxx"
ServerAdmin xx.xx@xx.xx
IdentLookups off
UseReverseDNS off
Port 21
PassivePorts 49152 65534
TimesGMT off
MaxInstances 30
MaxLoginAttempts 3
TimeoutLogin 300
TimeoutNoTransfer 117
TimeoutIdle 117
DisplayLogin welcome.msg
DisplayChdir .message
User www-data
Group www-data
DefaultChdir /path/to/www
DefaultRoot /path/to/www
DirFakeUser off nobody
DirFakeGroup off nobody
DefaultTransferMode binary
AllowForeignAddress off
AllowRetrieveRestart on
AllowStoreRestart on
DeleteAbortedStores off
TransferRate RETR 1000
TransferRate STOR 1000
TransferRate STOU 1000
TransferRate APPE 1000
SystemLog /var/log/secure
RequireValidShell off
AuthOrder mod_auth_file.c
AuthUserFile /etc/proftpd/ftpd.passwd
AuthGroupFile /etc/proftpd/ftpd.group
UserPassword xxx1 $xxx
UseFtpUsers on
AuthPAM off
TLSEngine off
TLSRequired auth+data
TLSVerifyClient off
TLSProtocol SSLv23
TLSLog /var/log/proftpd_tls.log
TLSRSACertificateFile /etc/gadmin-proftpd/certs/cert.pem
TLSRSACertificateKeyFile /etc/gadmin-proftpd/certs/key.pem
TLSCACertificateFile /etc/gadmin-proftpd/certs/cacert.pem
TLSRenegotiate required off
TLSOptions AllowClientRenegotiation
Ratios off
SaveRatios off
RatioFile "/restricted/proftpd_ratios"
RatioTempFile "/restricted/proftpd_ratios_temp"
CwdRatioMsg "Please upload first!"
FileRatioErrMsg "FileRatio limit exceeded, upload something first…"
ByteRatioErrMsg "ByteRatio limit exceeded, upload something first…"
LeechRatioMsg "Your ratio is unlimited."
AllowUser xxx1
AllowUser xxx2
AllowUser xxx3
DenyALL
<Directory /path/to/www>
AllowUser xxx1
AllowUser xxx2
AllowUser xxx3
DenyALL
<Anonymous /path/to/www>
User xxx3
Group xxx
AnonRequirePassword on
MaxClients 10 "The server is full, hosting %m users"
DisplayLogin welcome.msg
DisplayChdir .msg
Allow from All
Deny from all
AllowOverwrite on
AllowAll
DenyAll
<Anonymous /path/to/www>
User xxx2
Group xxx
AnonRequirePassword on
MaxClients 10 "The server is full, hosting %m users"
DisplayLogin welcome.msg
DisplayChdir .msg
Allow from All
Deny from all
AllowOverwrite on
AllowAll
DenyAll
[/code]