serveur_proftpd
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
serveur_proftpd [2007/03/31 17:54] – thierry | serveur_proftpd [2010/12/19 14:00] (Version actuelle) – thierry | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Installer ProFTPD ====== | ====== Installer ProFTPD ====== | ||
+ | |||
===== Au début ===== | ===== Au début ===== | ||
Ligne 5: | Ligne 6: | ||
# apt-get install proftpd | # apt-get install proftpd | ||
+ | ===== BUGS ===== | ||
+ | |||
+ | Ajouter: " | ||
+ | |||
+ | Parce que parfois, ca ne fonctionne pas comme on voudrait? ( " | ||
+ | |||
+ | ===== SSL ===== | ||
+ | Liens: | ||
+ | *http:// | ||
+ | *http:// | ||
+ | |||
+ | ==== Key ==== | ||
+ | |||
+ | # cd / | ||
+ | # mkdir keys | ||
+ | # chmod 0750 keys | ||
+ | # chown proftpd: | ||
+ | # su -s /bin/bash proftpd | ||
+ | $ cd keys | ||
+ | $ openssl req -new -x509 -days 3650 -nodes -out proftpd-rsa.pem -keyout proftpd-key.pem | ||
+ | Country Name (2 letter code) [AU]:FR | ||
+ | State or Province Name (full name) [Some-State]: | ||
+ | Locality Name (eg, city) []:Creteil | ||
+ | Organization Name (eg, company) [Internet Widgits Pty Ltd]: | ||
+ | Organizational Unit Name (eg, section) []:web | ||
+ | Common Name (eg, YOUR name) []: | ||
+ | Email Address []: | ||
+ | On a alors: | ||
+ | | ||
+ | -rw-r--r-- 1 proftpd nogroup 1233 déc 25 14:31 proftpd-rsa.pem | ||
+ | -rw-r--r-- 1 proftpd nogroup | ||
+ | |||
+ | L' | ||
+ | $ hostname -f | ||
+ | www.thierry-jaouen.fr | ||
+ | |||
+ | ==== tls.conf ==== | ||
+ | |||
+ | Dans le fichier **''/ | ||
+ | # egrep -v " | ||
+ | < | ||
+ | TLSEngine | ||
+ | TLSLog | ||
+ | TLSProtocol | ||
+ | TLSRSACertificateFile | ||
+ | TLSRSACertificateKeyFile | ||
+ | TLSOptions | ||
+ | TLSVerifyClient | ||
+ | TLSRequired | ||
+ | </ | ||
+ | |||
+ | ==== proftpd.conf ==== | ||
+ | |||
+ | Autoriser " | ||
+ | | ||
+ | ... < | ||
+ | | ||
+ | Include / | ||
+ | | ||
+ | ... < | ||
+ | |||
+ | PassivePorts | ||
+ | UseSendFile off | ||
+ | |||
+ | " | ||
+ | |||
+ | " | ||
===== Restreindre les droits comme j'aime ===== | ===== Restreindre les droits comme j'aime ===== | ||
Ligne 130: | Ligne 198: | ||
n' | n' | ||
+ | |||
===== Des droits trés limités ===== | ===== Des droits trés limités ===== | ||
Ligne 145: | Ligne 214: | ||
< | < | ||
<Limit WRITE STOR RNFR DELE> | <Limit WRITE STOR RNFR DELE> | ||
+ | | ||
DenyAll | DenyAll | ||
</ | </ | ||
</ | </ | ||
+ | | ||
# on peut quand même ecrire dans le répertoire ' | # on peut quand même ecrire dans le répertoire ' | ||
< | < | ||
+ | | ||
<Limit WRITE STOR RNFR DELE> | <Limit WRITE STOR RNFR DELE> | ||
AllowAll | AllowAll | ||
Ligne 161: | Ligne 230: | ||
Au final, l' | Au final, l' | ||
+ | |||
===== Droits limités, sauf pour un... ===== | ===== Droits limités, sauf pour un... ===== | ||
Ligne 179: | Ligne 249: | ||
Deny from all | Deny from all | ||
</ | </ | ||
+ | | ||
</ | </ | ||
+ | | ||
< | < | ||
<Limit WRITE STOR RNFR> | <Limit WRITE STOR RNFR> | ||
AllowAll | AllowAll | ||
</ | </ | ||
+ | | ||
</ | </ | ||
+ | |||
===== RequireValidShell et /etc/shells ===== | ===== RequireValidShell et /etc/shells ===== | ||
Ligne 198: | Ligne 269: | ||
Cela permet a **proftpd** (entre autres) de voir **/ | Cela permet a **proftpd** (entre autres) de voir **/ | ||
- | ---- | + | |
+ | |||
+ | ====== tweak ====== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Proftpd lent ===== | ||
+ | Lien: http:// | ||
+ | |||
+ | Si on a une impression de lenteur, notamment simplement a la connexion, alors il faut ajouter dans **'' | ||
+ | IdentLookups off | ||
+ | UseReverseDNS off | ||
+ | Et re-demarrer. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== mod_rewrite ===== | ||
+ | Lien: http:// | ||
+ | |||
+ | Une webcam qui ecrit dans un repertoire, dans un format non souhaité: | ||
+ | / | ||
+ | |||
+ | ==== New method ==== | ||
+ | On va changer cela avec " | ||
+ | |||
+ | < | ||
+ | RewriteEngine on | ||
+ | #RewriteLog / | ||
+ | RewriteLog none | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | # transformer la creation d'un repertoire "de chiffre" | ||
+ | RewriteCondition %m MKD | ||
+ | RewriteCondition %f " | ||
+ | RewriteRule ^(\/ | ||
+ | |||
+ | # transformer le changement de chemin d'un repertoire "de chiffre" | ||
+ | RewriteCondition %m CWD | ||
+ | RewriteCondition %f " | ||
+ | RewriteRule ^(\/ | ||
+ | |||
+ | # transformer le nom du fichier en " | ||
+ | RewriteCondition %m STOR | ||
+ | RewriteCondition %f " | ||
+ | RewriteRule ^(\/ | ||
+ | |||
+ | etc... | ||
+ | </ | ||
+ | |||
+ | Suite a une mise à jour du firmware de la cam, ca ne fonctionnait plus... | ||
+ | |||
+ | J'ai corrigé les règles, mais elles me semblent plus compliqués maintenant... mais ca marche. | ||
+ | |||
+ | ==== Old fashion ==== | ||
+ | | :!: les règles sont pas bien rédigées... | | ||
+ | |||
+ | On va changer cela avec " | ||
+ | < | ||
+ | RewriteEngine on | ||
+ | #RewriteLog / | ||
+ | RewriteLog none | ||
+ | |||
+ | # ----------------------------- | ||
+ | # pour le compte " | ||
+ | |||
+ | # transformer la creation d'un repertoire "de chiffre" | ||
+ | RewriteCondition %U webcam | ||
+ | RewriteCondition %m MKD | ||
+ | RewriteCondition %f " | ||
+ | RewriteRule ^(.*) capture | ||
+ | |||
+ | # transformer le changement de chemin d'un repertoire "de chiffre" | ||
+ | RewriteCondition %U webcam | ||
+ | RewriteCondition %m CWD | ||
+ | RewriteCondition %f " | ||
+ | RewriteRule ^(.*) capture | ||
+ | |||
+ | # transformer le nom du fichier en " | ||
+ | RewriteCondition %U webcam | ||
+ | RewriteCondition %m STOR | ||
+ | RewriteCondition %f " | ||
+ | RewriteRule ^(.*) cap.jpg | ||
+ | |||
+ | # ----------------------------- | ||
+ | </ | ||
+ | |||
+ | Au final, le fichier " | ||
+ | / | ||
+ | (Y a juste un petit relicat de " | ||
+ | |||
+ | |||
serveur_proftpd.1175363644.txt.gz · Dernière modification : 2007/03/31 17:54 de thierry