Vreau sa fac un server de ftp pe langa serverul de web care il am ...
1. Am dat jos proftpd-1.3.2-4.1mdv2009.1.i586
2. Apoi /etc/init.d/proftpd restart
Stopping proftpd [ OK ]
Starting proftpd [ OK ]
3. cat /etc/init.d/proftpd
#!/bin/sh # # Startup script for ProFTPd # # chkconfig: 345 85 15 # description: ProFTPD is an enhanced FTP server with \ # a focus toward simplicity, security, and ease of configuration. \ # It features a very Apache-like configuration syntax, \ # and a highly customizable server infrastructure, \ # including support for multiple 'virtual' FTP servers, \ # anonymous FTP, and permission-based directory visibility. # processname: proftpd # config: /etc/proftpd.conf # ### BEGIN INIT INFO # Provides: proftpd # Required-Start: $network # Required-Stop: $network # Should-Start: mysqld postgresql radiusd ldap # Should-Stop: mysqld postgresql radiusd ldap # Default-Start: 3 4 5 # Short-Description: ProFTPD FTP server # description: ProFTPD is an enhanced FTP server with # a focus toward simplicity, security, and ease of configuration. # It features a very Apache-like configuration syntax, # and a highly customizable server infrastructure, # including support for multiple 'virtual' FTP servers, # anonymous FTP, and permission-based directory visibility. ### END INIT INFO # Source function library. . /etc/rc.d/init.d/functions # source network configuration . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 NAME=proftpd FTPSHUT=/usr/sbin/ftpshut LOCKFILE=/var/lock/subsys/$NAME RETVAL=0 start() { # Check if it is already running if [ ! -f $LOCKFILE ]; then gprintf "Starting %s" "$NAME" daemon "proftpd" 2>/dev/null RETVAL=$? [ $RETVAL -eq 0 ] && touch $LOCKFILE echo fi } stop() { gprintf "Stopping %s" "$NAME" killproc proftpd RETVAL=$? [ $RETVAL -eq 0 ] && rm -f $LOCKFILE echo } reload() { gprintf "Reloading %s" "$NAME" killproc proftpd -HUP RETVAL=$? echo } suspend() { if [ $# -gt 1 ]; then shift gprintf "Suspending proftpd with '$*' " $FTPSHUT $* else gprintf "Suspending proftpd NOW " $FTPSHUT now "Maintenance in progress" fi killproc proftpd RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f $LOCKFILE } resume() { if [ -f /etc/shutmsg ]; then gprintf "Allowing proftpd sessions again " rm -f /etc/shutmsg else gprintf "Starting proftpd; was not suspended " fi daemon "proftpd >/dev/null 2>&1" RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $LOCKFILE } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status proftpd RETVAL=$? ;; restart) stop start ;; condrestart) if [ -f $LOCKFILE ]; then stop start fi ;; reload) reload ;; suspend) suspend ;; resume) resume ;; *) gprintf "Usage: %s {start|stop|status|restart|condrestart|reload|resume|suspend} [time]" "$0" exit 1 esac exit $RETVAL
4. am intrat si pe router "D-link-524" si am dat urmatoarea regula la advance virtual server "ftp-server 192.168.1.250 Both 21 / 21 Always"
LE: am uitat sa precizez : netstat -a |grep ftp
tcp 0 0 *:ftp *:* LISTEN unix 2 [ ACC ] STREAM LISTENING 56070 /var/run/proftpd/proftpd.sock
ftp://localhost merge , dar din exterior nu vrea sa mearga ....
Am urmatoarele intrebari :
a. cum fac sa il vad si din exterior
b. vreau ca un anumit user sau mai multi sa aiba acces la un anumit folder si nu la folderul "~" sa zicem ca folderul comun va fi /ftp/comun/*.*
cum te cauta din exterior?
ar trebui de forma:
ftp://ip_tau_exterior/ (de exemplu: ftp:// 88.22.33.66/)
Cristian
http://www.mandrivausers.ro
dai te rog ca root comanda: iptables -L
posibil sa nu ai acces din afara din cauza firewallului...
--
Ghidul Mandriva
Configurarea PPPoE
Da , in orice browser ar trebui sa mearga cu ftp://a.b.c.d , ip care merge si la serverul de web (http://a.b.c.d) doar ca la ftp nu merge ..serverul de web se vede si din exterior, dar ftp nu se vede decat de pe server (firefox), nici macar din retea ...
la comanda iptables -L |grep ftp nu da nimic ... Deasemeni iptables -L |grep 21 , nimic....
---------------------
[url=http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=432155]L... Registered User 432155 [/url]
Posibil atunci ca iptables sa nu lase ftp...
Opreste momentan iptables si verifica daca ftp devine accesibil de afara. (service iptables stop)
--
Ghidul Mandriva
Configurarea PPPoE
da , merge , ... problema era din firewall dar am facut si o gafa MARE (am dat service iptables stop, am vazut ca merge , m-am convins ca era de la firewall si apoi am dat service iptables start)... acum cand ii dau iptables -L imi da ca totul acepta si totul intra .. inainte aveam niste reguli default .... adica firewall din mandriva default ... spune-mi te rog cum il refac ... ca acum se intra ca in paine ....
LE: in cele din urma daca am vazut ca nu stiu cum sa il refac am dat iptables panic, dar vreau sa-l refac firewall cum era inainte.
---------------------
[url=http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=432155]L... Registered User 432155 [/url]
vezi in MCC
Cristian
http://www.mandrivausers.ro
Da un restart la tot systemul, ar trebui sa se refaca. Eu oricum iti recomand sa iti editezi iptables manual, este varianta cea mai sigura si cea mai transparenta. Am explicat (cu exemple) in Ghid cum se face.
Csabi's BLOG
Linux registered user # 457717
cum dezinstalez si reinstalez proftpd?
De ce ai vrea sa faci asta? Banuiesc ca problema ta nu este cu pachetul.
Csabi′s BLOG
Linux registered user # 457717
am facut o salata cam urayta in el si numi mai porneste as vrea sal iau de la capat sunt incepator si sper sa intelegi
am facut niste setari in el cu webminu si nu a vrut sa mai porneasca nici dupa restart nici prin comanda si as vrea sal reinstalez fiindca nu mai stiu exact ce iam facut :))
Ma, nu stiu daca te va ajuta o reinstalare, de obicei setarile se pastreaza. Nu am un Mandriva la indemana acum, dar cred ca comanda ar fi:
urpme proftpd
urpmi proftpd
sau ceva similar. Cauta pachetul cu urpmq -a proftp sa vezi cum se numeste exact daca nu merge ce am scris mai sus.
Csabi′s BLOG
Linux registered user # 457717
a mers porneste ms