#1 Le 01/02/2007, à 19:37
- paulnux
Ne pas remonter l'arborescence avec Proftpd ? DefaultRoot ~ ?
Bonjour,
Voulant que les utilisateurs ne puisse pas remonter l'arborescence, en cherchant j'ais trouvé DefaultRoot ~ mais cela ne fonctionne pas, tout le monde peux remonter le systeme de fichier ce qui est pas GLOP
Donc si une ame charitable peux m'aider à chrooter les utilisateurs dans leurs home cela serait gentil, merci.
Voici mon conf
ServerType standalone
DefaultServer on
DefaultRoot ~
Umask 022
ServerName "82.***.**.**"
ServerIdent on "My FTPD"
Bind "82.***.**.**"
ServerAdmin Admin@this.domain.topdomain
IdentLookups off
UseReverseDNS off
Port 21
PassivePorts 49152 65534
MasqueradeAddress 82.***.**.**
TimesGMT off
MaxInstances 30
MaxLoginAttempts 3
TimeoutLogin 300
TimeoutNoTransfer 120
TimeoutIdle 120
User nobody
Group nobody
DirFakeUser off nobody
DirFakeGroup off nobody
DefaultTransferMode binary
AllowForeignAddress on
AllowRetrieveRestart on
AllowStoreRestart on
DeleteAbortedStores off
TransferRate RETR 30
TransferRate STOR 40
TransferRate STOU 40
TransferRate APPE 40
SystemLog /var/log/secure
#gp_random_username_length 6
#gp_random_password_length 6
#gp_randomize_case lower
#gp_useradd_root_path /home/ftp
#gp_useradd_upload_path /upload
#gp_html_path /var/www/ftp.html
#gp_welcome_name welcome.msg
<IfModule mod_tls.c>
TLSEngine off
TLSRequired off
TLSVerifyClient off
TLSProtocol TLSv1
TLSLog /var/log/proftpd_tls.log
TLSRSACertificateFile /etc/gproftpd/gproftpd.pem
</IfModule>
<Limit LOGIN>
AllowUser rustin
AllowUser smcf
DenyALL
</Limit>
<Anonymous /home/ftp/rustin>
User rustin
Group rustin
AnonRequirePassword on
MaxClients 3 "The server is full, hosting %m users"
DisplayLogin welcome.msg
DisplayFirstChdir .msg
AllowOverwrite off
<Limit LOGIN>
Allow from all
Deny from all
</Limit>
<Limit ROOT_DIR_ALLOW RETR LIST NLST MDTM SIZE STAT CWD XCWD PWD XPWD CDUP XCUP>
AllowAll
</Limit>
<Limit ROOT_DIR_DENY DELE APPE STOR STOU SITE_CHMOD SITE_CHGRP RNFR RNTO MKD XMKD RMD XRMD>
DenyAll
</Limit>
<Directory /home/ftp/rustin/pour_smcf/*>
AllowOverwrite on
<Limit UPLOAD_DIR_ALLOW LIST NLST MDTM SIZE SITE STAT APPE RETR STOR STOU MKD XMKD CWD XCWD PWD XPWD CDUP XCUP>
AllowAll
</Limit>
<Limit UPLOAD_DIR_DENY DELE SITE_CHMOD SITE_CHGRP RMD XRMD RNFR RNTO>
DenyAll
</Limit>
</Directory>
</Anonymous>
<Anonymous /home/ftp>
User smcf
Group smcf
AnonRequirePassword on
MaxClients 3 "The server is full, hosting %m users"
DisplayLogin welcome.msg
DisplayFirstChdir .msg
AllowOverwrite off
<Limit LOGIN>
Allow from all
Deny from all
</Limit>
<Limit ROOT_DIR_ALLOW RETR LIST NLST MDTM SIZE STAT CWD XCWD PWD XPWD CDUP XCUP>
AllowAll
</Limit>
<Limit ROOT_DIR_DENY DELE APPE STOR STOU SITE_CHMOD SITE_CHGRP RNFR RNTO MKD XMKD RMD XRMD>
DenyAll
</Limit>
<Directory /home/ftp/*>
AllowOverwrite on
<Limit UPLOAD_DIR_ALLOW LIST NLST STOR STOU APPE RETR RNFR RNTO DELE MKD XMKD RMD XRMD SITE_CHMOD SITE_CHGRP STAT MDTM PWD XPWD SIZE CWD XCWD CDUP XCUP SITE >
AllowAll
</Limit>
<Limit UPLOAD_DIR_DENY>
DenyAll
</Limit>
</Directory>
</Anonymous>
« Il y a beaucoup de causes pour lesquelles je suis prêt à mourir mais aucune cause pour laquelle je suis prêt à tuer. » Gandhi
Hors ligne
#2 Le 02/02/2007, à 00:30
- dexinou
Re : Ne pas remonter l'arborescence avec Proftpd ? DefaultRoot ~ ?
Salut,
essai de placer ta directive à un autre endroit dans le fichier de conf en faisant des tests.
Ubuntu 9.10 64bits ext4 ® Core 2 Duo
Unix..... il y a moins bien mais c'est plus cher.
Si t'as pas compris la réponse, pose mieux ta question.
Tutoriaux Linux, apache, pure-ftpd, bind, mysql, qmail...
Hors ligne
#3 Le 02/02/2007, à 00:43
- paulnux
Re : Ne pas remonter l'arborescence avec Proftpd ? DefaultRoot ~ ?
Merci pour ton aide
Mais j'ais deja essayé de le placer ailleurs et on arrive toujours à remonter
Je vois pas ou sa coince ca devrait le faire
« Il y a beaucoup de causes pour lesquelles je suis prêt à mourir mais aucune cause pour laquelle je suis prêt à tuer. » Gandhi
Hors ligne
#4 Le 02/02/2007, à 00:50
- dexinou
Re : Ne pas remonter l'arborescence avec Proftpd ? DefaultRoot ~ ?
Test d'abord avec une configuration simple de proftpd ensuite tu tests avec ta config pour voir où ça coince.
Ubuntu 9.10 64bits ext4 ® Core 2 Duo
Unix..... il y a moins bien mais c'est plus cher.
Si t'as pas compris la réponse, pose mieux ta question.
Tutoriaux Linux, apache, pure-ftpd, bind, mysql, qmail...
Hors ligne
#5 Le 02/02/2007, à 01:24
- B@rtounet
Re : Ne pas remonter l'arborescence avec Proftpd ? DefaultRoot ~ ?
je l'ai mis à la fin et ca fontionne pour moi...
les utilisateurs sont cantoné à leur dossier
Hors ligne
#6 Le 02/02/2007, à 13:40
- christianlg
Re : Ne pas remonter l'arborescence avec Proftpd ? DefaultRoot ~ ?
Bonjour paulnux,
pour ma part, j'ai ajouté dans /etc/proftpd.conf :
<Global>
DefaultRoot ~
DefaultChdir ~
AllowOverwrite yes
MaxClients 3
MaxClientsPerHost 1
UseFtpUsers on
AllowForeignAddress on
ServerIdent on "ftp Server Ready"
AccessGrantMsg "Bienvenue %u"
</Global>
La connexion se fait avec le login et le mot de passe de l'utilisateur possédant un compte sur la machine, et il ne peut pas sortir de son home. Merci Gillaume du forum Ubuntu.
chris