server ftp non funziona

Installazione, configurazione e uso di Ubuntu come server: web, ftp, mail, news, proxy, dns e altro.
Scrivi risposta
ceradini
Prode Principiante
Messaggi: 8
Iscrizione: lunedì 12 gennaio 2015, 17:32
Desktop: none
Distribuzione: Ubuntu Server 14.04 LTS

server ftp non funziona

Messaggio da ceradini »

Salve a tutti, ho da poco avviato il mio primo server ubuntu (14.04 LTS - solo shell) su un istanza di aws cloud amazon, ho installato apache2 e di fatto il mio server web funziona correttamente senza nessun problema (almeno su questo fronte).

Adesso però sto cercando di abilitare anche l'accesso FTP in modo tale da caricare correttamente i miei file e tutto ciò di cui ho bisogno, ho quindi installato il pacchetto vsftpd, ho editato il file vsftpd.conf abilitando (anche se resterà un'opzione temporanea per ragioni di sicurezza) l'accesso anonimo, attivato la possibilità di scrivere e leggere, insomma ho modificato quei parametri che sono indicati anche nella guida ufficiale di ubuntu.
Il server FTP però non risponde ne al comando: ftp mioIndirizzoIP , ne ad un accesso con filezilla da client remoto. In entrambi i casi la connessione supera il time-out e viene killata.

Inoltre il comando ' /etc/init.d/vsftpd start' non funziona (output: /etc/init.d/vsftpd command not foud) perchè di fatto in etc/init.d non esiste il file vsftpd, mentre 'service vsftpd start' funziona correttamente.
Cosa sto sbagliando? Come posso configurare correttamente il mio accesso ftp al server?

Grazie infinite dell'aiuto, Matteo

p.s. C'è qualche comando che può esservi di aiuto per capire la mia configurazione e cosa c'è che non va?
Avatar utente
ilovelinux
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1590
Iscrizione: lunedì 22 luglio 2013, 8:49
Desktop: Awesome
Distribuzione: Archlinux x86_64
Sesso: Maschile
Località: Sicilia, Italia

Re: server ftp non funziona

Messaggio da ilovelinux »

Posta:

Codice: Seleziona tutto

cat /etc/vsftpd.conf
ceradini
Prode Principiante
Messaggi: 8
Iscrizione: lunedì 12 gennaio 2015, 17:32
Desktop: none
Distribuzione: Ubuntu Server 14.04 LTS

Re: server ftp non funziona

Messaggio da ceradini »

Codice: Seleziona tutto

# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
#
# Run standalone?  vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
listen=YES
#
# Run standalone with IPv6?
# Like the listen parameter, except vsftpd will listen on an IPv6 socket
# instead of an IPv4 one. This parameter and the listen parameter are mutually
# exclusive.
#listen_ipv6=YES
#
# Allow anonymous FTP? (Disabled by default)
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# If enabled, vsftpd will display directory listings with the time
# in  your  local  time  zone.  The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#

# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
ftpd_banner=Benvenuti nel servizio FTP 
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may restrict local users to their home directories.  See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=YES
#

# You may fully customise the login banner string:
ftpd_banner=Benvenuti nel servizio FTP 
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may restrict local users to their home directories.  See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=YES
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
#chroot_local_user=YES
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# Customization
#
# Some of vsftpd's settings don't fit the filesystem layout by
# default.
#
# This option should be the name of a directory which is empty.  Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/vsftpd/empty
#
# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
# This option specifies the location of the RSA key to use for SSL
# encrypted connections.
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

userlist_enable=YES
userlist_deny=NO
userlist_file=/etc/vsftpd.user_list
Ultima modifica di ceradini il mercoledì 14 gennaio 2015, 18:51, modificato 2 volte in totale.
Avatar utente
jackynet92
Moderatore Globale
Moderatore Globale
Messaggi: 13413
Iscrizione: sabato 3 settembre 2011, 1:41
Desktop: Mate
Distribuzione: Ubuntu 16.04 64bit
Sesso: Maschile
Località: Torino

Re: server ftp non funziona

Messaggio da jackynet92 »

Modifica il precedente post. Clicca su modifica, selezioni il testo e poi clicca su codice
Avatar utente
ilovelinux
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1590
Iscrizione: lunedì 22 luglio 2013, 8:49
Desktop: Awesome
Distribuzione: Archlinux x86_64
Sesso: Maschile
Località: Sicilia, Italia

Re: server ftp non funziona

Messaggio da ilovelinux »

Commenta la stringa:

Codice: Seleziona tutto

connect_from_port_20=YES
ceradini
Prode Principiante
Messaggi: 8
Iscrizione: lunedì 12 gennaio 2015, 17:32
Desktop: none
Distribuzione: Ubuntu Server 14.04 LTS

Re: server ftp non funziona

Messaggio da ceradini »

Fatto, però la situazione non cambia, anzi ora al comando: service vsftpd start mi restituisce: Job failed to start

EDIT:

Ho disinstallato vsftpd e ho riprovato ad installarlo, ho tenuto lo stesso file di configurazione mostrato nel post precedente (commentando come suggerito la riga sulla porta da usare) ma il server ftp non risponde, cioè parte ma poi alla chiamata ftp localhost risponde con un "Connection refused".

C'è qualcuno che saprebbe aiutarmi? non riesco a capire dove sto sbagliando..

Grazie dell'aiuto, Matteo

p.s. Inoltre nel file init.d non c'è un vsftpd, per avviarlo devo dare come sempre il comando service vsftpd start e non /etc/init.d/vsftpd start
Avatar utente
Calabria
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 290
Iscrizione: sabato 19 maggio 2007, 1:01
Località: Calabria
Contatti:

Re: server ftp non funziona

Messaggio da Calabria »

Hai un firewall? Se si quale? Che porte ha aperte/chiuse?
ceradini
Prode Principiante
Messaggi: 8
Iscrizione: lunedì 12 gennaio 2015, 17:32
Desktop: none
Distribuzione: Ubuntu Server 14.04 LTS

Re: server ftp non funziona

Messaggio da ceradini »

Io non ho impostato manualmente nessun firewall, quindi dovrebbe esserci quello di default impostato da ubuntu server, comunque ecco qui dei comandi:

Codice: Seleziona tutto

#iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination    

Codice: Seleziona tutto

netstat -lptu

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 localhost:5910          *:*                     LISTEN      1502/Xvnc       
tcp        0      0 localhost:3350          *:*                     LISTEN      1058/xrdp-sesman
tcp        0      0 *:ssh                   *:*                     LISTEN      1018/sshd       
tcp        0      0 localhost:5911          *:*                     LISTEN      11179/Xvnc      
tcp        0      0 localhost:5912          *:*                     LISTEN      11825/Xvnc      
tcp        0      0 localhost:5913          *:*                     LISTEN      12824/Xvnc      
tcp        0      0 *:3389                  *:*                     LISTEN      1055/xrdp       
tcp        0      0 localhost:mysql         *:*                     LISTEN      16242/mysqld    
tcp6       0      0 [::]:http               [::]:*                  LISTEN      16195/apache2   
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      1018/sshd       
udp        0      0 *:bootpc                *:*                                 609/dhclient    
udp        0      0 *:48866                 *:*                                 609/dhclient    
udp6       0      0 [::]:25254              [::]:*                              609/dhclient  

Codice: Seleziona tutto

netstat -tulpn

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:5910          0.0.0.0:*               LISTEN      1502/Xvnc       
tcp        0      0 127.0.0.1:3350          0.0.0.0:*               LISTEN      1058/xrdp-sesman
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1018/sshd       
tcp        0      0 127.0.0.1:5911          0.0.0.0:*               LISTEN      11179/Xvnc      
tcp        0      0 127.0.0.1:5912          0.0.0.0:*               LISTEN      11825/Xvnc      
tcp        0      0 127.0.0.1:5913          0.0.0.0:*               LISTEN      12824/Xvnc      
tcp        0      0 0.0.0.0:3389            0.0.0.0:*               LISTEN      1055/xrdp       
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      16242/mysqld    
tcp6       0      0 :::80                   :::*                    LISTEN      16195/apache2   
tcp6       0      0 :::22                   :::*                    LISTEN      1018/sshd       
udp        0      0 0.0.0.0:68              0.0.0.0:*                           609/dhclient    
udp        0      0 0.0.0.0:48866           0.0.0.0:*                           609/dhclient    
udp6       0      0 :::25254                :::*                                609/dhclient  
EDIT:

Nel frattempo riallego il mio vsftpd.conf che è stato aggiornato:

Codice: Seleziona tutto

    #File di configurazione Server FTP
    anonymous_enable=YES
    anon_upload_enable=YES
    anon_mkdir_write_enable=YES
    local_enable=YES
    write_enable=YES
    dirmessage_enable=YES
    xferlog_enable=YES
    xferlog_file=/var/log/vsftpd.log
    xferlog_std_format=YES
    listen=YES 
    listen_port=21
    ftpd_banner=Benvenuto nel Server FTP
    chroot_local_user=YES
    check_shell=NO
    userlist_deny=NO
    userlist_enable=YES  
    userlist_file=/etc/vsftpd.user_list
    pam_service_name=/bin/false  
Un altro problema è che forse nemmeno parte, con questi due comandi questo è il risultato:

Codice: Seleziona tutto

sudo service vsftpd start
     vsftpd start/pre-start, process 1976
sudo service vsftpd status
     vsftpd stop/waiting
però dando un ps aux il processo per l'ftp è presente:

Codice: Seleziona tutto

ubuntu    1883  0.0  0.1  19164  1536 pts/0    T    14:48   0:00 ftp localhost 21
ubuntu    1884  0.0  0.1  19164  1528 pts/0    T    14:48   0:00 ftp localhost
ubuntu    1946  0.0  0.1  19164  1532 pts/0    T    14:52   0:00 ftp localhost 21
ubuntu    1947  0.0  0.1  19164  1528 pts/0    T    14:52   0:00 ftp localhost
Avatar utente
Calabria
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 290
Iscrizione: sabato 19 maggio 2007, 1:01
Località: Calabria
Contatti:

Re: server ftp non funziona

Messaggio da Calabria »

purtroppo non si evince se la porta e aperta o no.

Usa ufw come interfaccia del firewall è molto più semplice: http://wiki.ubuntu-it.org/Sicurezza/Ufw

Attento: se accedi al server tramite SSH o altra connessione remota, assicurati di aprire prima la corrispondente porta altrimenti resterai fuori dal tuo server :birra:

Dopo che hai fatto posta uno

Codice: Seleziona tutto

sudo ufw status
ceradini
Prode Principiante
Messaggi: 8
Iscrizione: lunedì 12 gennaio 2015, 17:32
Desktop: none
Distribuzione: Ubuntu Server 14.04 LTS

Re: server ftp non funziona

Messaggio da ceradini »

Usa ufw come interfaccia del firewall

Dopo che hai fatto posta uno

Codice: Seleziona tutto

sudo ufw status

Codice: Seleziona tutto

Status: active

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere
21/tcp                     ALLOW       Anywhere
990/tcp                    ALLOW       Anywhere
80                         ALLOW       Anywhere
443                        ALLOW       Anywhere
22 (v6)                    ALLOW       Anywhere (v6)
21/tcp (v6)                ALLOW       Anywhere (v6)
990/tcp (v6)               ALLOW       Anywhere (v6)
80 (v6)                    ALLOW       Anywhere (v6)
443 (v6)                   ALLOW       Anywhere (v6)

Avatar utente
Calabria
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 290
Iscrizione: sabato 19 maggio 2007, 1:01
Località: Calabria
Contatti:

Re: server ftp non funziona

Messaggio da Calabria »

Io proverei a disistallare purgandolo il server FTP e reinstallare, qualcosa a livello di file non mi torna :sisi:
Avatar utente
kimj
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1058
Iscrizione: sabato 13 settembre 2008, 11:45

Re: server ftp non funziona

Messaggio da kimj »

EC2 ha un firewall.
http://docs.aws.amazon.com/AWSEC2/lates ... urity.html

se non permetti ftp dal firewall ec2, poco importa cosa giri sulla macchina o come e' configurato iptables.

AWS e' l'equivalente informatico dell'ufficio complicazione affari semplici...
We no longer think of chairs as technology; we just think of them as chairs. But there was a time when we hadn't worked out how many legs chairs should have, how tall they should be, and they would often 'crash' when we tried to use them.
Avatar utente
kimj
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1058
Iscrizione: sabato 13 settembre 2008, 11:45

Re: server ftp non funziona

Messaggio da kimj »

oltre al firewall di aws, pare ci fosse anche questo bug che impediva di avviare vsftpd su ec2: https://bugs.launchpad.net/ubuntu/+sour ... ug/1313450

che versione del kernel usi? (controlla con uname -a).

inoltre, cosa dice, da root,

Codice: Seleziona tutto

service vsftpd restart --system
nota il --system. di default con ec2 ti logghi con l'utente ubuntu@istanza, fornendo la chiave ssh, ma dall'utente ubuntu non puoi avviare vsftpd.

per agire come root, usa dopo il login

Codice: Seleziona tutto

sudo -i
(potresti postare anche l'output dei comandi:

Codice: Seleziona tutto

id
file /etc/init.d/vsftpd
sudo file /etc/init.d/vsftpd
ls -l /etc/init.d
(dovrebbe apparirti che esiste il file /etc/init.d/vsftp, ma e' un link ad "/lib/init/upstart-job" che se eseguito da utente normale, non come root, non funziona)
We no longer think of chairs as technology; we just think of them as chairs. But there was a time when we hadn't worked out how many legs chairs should have, how tall they should be, and they would often 'crash' when we tried to use them.
ceradini
Prode Principiante
Messaggi: 8
Iscrizione: lunedì 12 gennaio 2015, 17:32
Desktop: none
Distribuzione: Ubuntu Server 14.04 LTS

Re: server ftp non funziona

Messaggio da ceradini »

In aws avevo già abilitato le comunicazioni TCP sulla porta 21
che versione del kernel usi?
3.13.0-36-generic
inoltre, cosa dice, da root,

Codice: Seleziona tutto

service vsftpd restart --system

Codice: Seleziona tutto

service vsftpd restart --system
stop: Unknown instance:
vsftpd start/pre-start, process 12261

Codice: Seleziona tutto

id
uid=0(root) gid=0(root) groups=0(root)

file /etc/init.d/vsftpd
/etc/init.d/vsftpd: ERROR: cannot open `/etc/init.d/vsftpd' (No such file or directory)

sudo file /etc/init.d/vsftpd
/etc/init.d/vsftpd: ERROR: cannot open `/etc/init.d/vsftpd' (No such file or directory)

(il file in init.d non c'è)

ls -l /etc/init.d

total 224
-rwxr-xr-x 1 root root 2243 Apr  3  2014 acpid
-rwxr-xr-x 1 root root 9974 Jan  7  2014 apache2
-rwxr-xr-x 1 root root 4596 Mar 27  2014 apparmor
-rwxr-xr-x 1 root root 2801 Oct 30 20:21 apport
-rwxrwxr-x 1 root root 1071 Sep  8  2013 atd
-rwxr-xr-x 1 root root 1919 Jan 18  2011 console-setup
lrwxrwxrwx 1 root root   21 Feb  9  2013 cron -> /lib/init/upstart-job
-rwxr-xr-x 1 root root  938 Nov  1  2013 cryptdisks
-rwxr-xr-x 1 root root  896 Nov  1  2013 cryptdisks-early
-rwxr-xr-x 1 root root 2813 Nov 25 19:37 dbus
-rwxr-xr-x 1 root root 1217 Mar  7  2013 dns-clean
lrwxrwxrwx 1 root root   21 Mar 14  2012 friendly-recovery -> /lib/init/upstart-job
-rwxr-xr-x 1 root root 1105 May  8  2014 grub-common
-rwxr-xr-x 1 root root 1329 Mar 13  2014 halt
-rwxr-xr-x 1 root root 1864 Nov 12  2012 irqbalance
-rwxr-xr-x 1 root root 1293 Mar 13  2014 killprocs
-rwxr-xr-x 1 root root 1990 Jan 22  2013 kmod
-rwxr-xr-x 1 root root 3202 Jan 28  2014 landscape-client
lrwxrwxrwx 1 root root   21 Mar  1  2012 lxdm -> /lib/init/upstart-job
-rwxr-xr-x 1 root root 5491 Feb 19  2014 mysql
-rwxr-xr-x 1 root root 4479 Mar 20  2014 networking
-rwxr-xr-x 1 root root 1292 Mar 13  2014 ondemand
-rwxr-xr-x 1 root root 1466 Mar 11  2014 open-vm-tools
-rwxr-xr-x 1 root root  561 Jan 22  2013 pppd-dns
-rwxr-xr-x 1 root root 1192 May 27  2013 procps
-rwxr-xr-x 1 root root 5127 Dec 20  2013 proftpd
-rwxr-xr-x 1 root root 6120 Mar 13  2014 rc
-rwxr-xr-x 1 root root  782 Mar 13  2014 rc.local
-rwxr-xr-x 1 root root  117 Mar 13  2014 rcS
-rw-r--r-- 1 root root 2427 Mar 13  2014 README
-rwxr-xr-x 1 root root  639 Mar 13  2014 reboot
-rwxr-xr-x 1 root root 2918 Jun 13  2014 resolvconf
-rwxr-xr-x 1 root root 4395 Apr 17  2014 rsync
-rwxr-xr-x 1 root root 2913 Dec  4  2013 rsyslog
-rwxr-xr-x 1 root root 1226 Jul 22  2013 screen-cleanup
-rwxr-xr-x 1 root root 3920 Mar 13  2014 sendsigs
-rwxr-xr-x 1 root root  590 Mar 13  2014 single
-rw-r--r-- 1 root root 4290 Mar 13  2014 skeleton
-rwxr-xr-x 1 root root 4077 May  2  2014 ssh
-rwxr-xr-x 1 root root  731 Feb  5  2014 sudo
-rwxr-xr-x 1 root root 6173 Apr 14  2014 udev
-rwxr-xr-x 1 root root 2721 Mar 13  2014 umountfs
-rwxr-xr-x 1 root root 2260 Mar 13  2014 umountnfs.sh
-rwxr-xr-x 1 root root 1872 Mar 13  2014 umountroot
-rwxr-xr-x 1 root root 1361 Dec  6  2013 unattended-upgrades
-rwxr-xr-x 1 root root 3111 Mar 13  2014 urandom
-rwxr-xr-x 1 root root 2666 Sep 25  2013 x11-common
-rwxr-xr-x 1 root root 4963 Sep 29  2012 xrdp
Come si fa ad disinstallare in maniera pulita vsftpd ? perché se anche lo disinstallo con: apt-get remove vsftpd lascia il file di configurazione, quindi non vorrei che ci fosse qualcosa di sbagliato e che nonostante disinstalli, rimanga
Avatar utente
kimj
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1058
Iscrizione: sabato 13 settembre 2008, 11:45

Re: server ftp non funziona

Messaggio da kimj »

Codice: Seleziona tutto

vsftpd start/pre-start, process 12261
ora e' partito (se si usa 'su' o sudo invece di 'su -' rimangono alcune variabili d'ambiente dell'utente normale, tra cui UPSTRART_SESSION, ed anche invocando da root 'service' senza --system questo potrebbe continuare ad agire sulla sessione utente invece che su quella di sistema).

in teoria ora dovrebbe funzoionare.

dovresti pero' anche permettere la porta 20/tcp oltre alla 21, 21 e' di controllo, 20 per i dati, ed un range di porte per la modalita' passiva a tuo piacimento (da configurare poi in vsftpd con pasv_min_port e pasv_max_port).

puoi provare a connetterti con 'ftp localhost' sul server per vedere se almeno in locale ora funziona?

per eliminare anche i file di configurazione, usa 'apt-get purge vsftpd'
We no longer think of chairs as technology; we just think of them as chairs. But there was a time when we hadn't worked out how many legs chairs should have, how tall they should be, and they would often 'crash' when we tried to use them.
ceradini
Prode Principiante
Messaggi: 8
Iscrizione: lunedì 12 gennaio 2015, 17:32
Desktop: none
Distribuzione: Ubuntu Server 14.04 LTS

Re: server ftp non funziona

Messaggio da ceradini »

kimj [url=http://forum.ubuntu-it.org/viewtopic.php?p=4711212#p4711212][img]http://forum.ubuntu-it.org/images/icons/icona-cita.gif[/img][/url] ha scritto: puoi provare a connetterti con 'ftp localhost' sul server per vedere se almeno in locale ora funziona?'
No, niente da fare e questo è l'output:

Codice: Seleziona tutto

#ftp localhost
ftp: connect: Connection refused
Ho aggiunto comunque la porta 20 al firewall di aws oltre anche ad un range per la connessione passiva.

Questo comando però mi ritorna un'output che non mi aspetterei dato che il vsftpd parte:

Codice: Seleziona tutto

#service vsftpd status
vsftpd stop/waiting
Avatar utente
kimj
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1058
Iscrizione: sabato 13 settembre 2008, 11:45

Re: server ftp non funziona

Messaggio da kimj »

e' possibile che crashi all'avvio o poco dopo: https://bugs.launchpad.net/ubuntu/+sour ... ug/1313450

dicono di avere risolto il problema, ma controllerei 'dmesg' (vedi se riporta output simile al primo commento)
We no longer think of chairs as technology; we just think of them as chairs. But there was a time when we hadn't worked out how many legs chairs should have, how tall they should be, and they would often 'crash' when we tried to use them.
ceradini
Prode Principiante
Messaggi: 8
Iscrizione: lunedì 12 gennaio 2015, 17:32
Desktop: none
Distribuzione: Ubuntu Server 14.04 LTS

Re: server ftp non funziona

Messaggio da ceradini »

kimj [url=http://forum.ubuntu-it.org/viewtopic.php?p=4711874#p4711874][img]http://forum.ubuntu-it.org/images/icons/icona-cita.gif[/img][/url] ha scritto:e' possibile che crashi all'avvio o poco dopo: https://bugs.launchpad.net/ubuntu/+sour ... ug/1313450

dicono di avere risolto il problema, ma controllerei 'dmesg' (vedi se riporta output simile al primo commento)
In effetti ho degli errori però non sono gli stessi del link suggerito, ecco qui l'output riguardante vsftpd di dmesg

Codice: Seleziona tutto

[610565.064615] init: vsftpd main process (19410) terminated with status 2
[610565.064623] init: vsftpd main process ended, respawning
[610565.071833] init: vsftpd main process (19414) terminated with status 2
[610565.071841] init: vsftpd main process ended, respawning
[610565.080191] init: vsftpd main process (19418) terminated with status 2
[610565.080199] init: vsftpd main process ended, respawning
[610565.089221] init: vsftpd main process (19422) terminated with status 2
[610565.089230] init: vsftpd main process ended, respawning
[610565.097449] init: vsftpd main process (19426) terminated with status 2
[610565.097457] init: vsftpd main process ended, respawning
[610565.105376] init: vsftpd main process (19430) terminated with status 2
[610565.105383] init: vsftpd main process ended, respawning
[610565.113961] init: vsftpd main process (19434) terminated with status 2
[610565.113969] init: vsftpd main process ended, respawning
[610565.121878] init: vsftpd main process (19438) terminated with status 2
[610565.121886] init: vsftpd main process ended, respawning
[610565.129789] init: vsftpd main process (19442) terminated with status 2
[610565.129797] init: vsftpd main process ended, respawning
[610565.137358] init: vsftpd main process (19446) terminated with status 2
[610565.137366] init: vsftpd main process ended, respawning
[610565.145271] init: vsftpd main process (19450) terminated with status 2
[610565.145278] init: vsftpd respawning too fast, stopped
Non credo sia infatti un problema di kernel..

EDIT

Ora il vsftpd funziona, ho rimosso completamento l'applicazione e l'ho reinstallata, ora è andato tutto bene e posso connettermi da console, infatti con ftp localhost tutto funziona correttamente.

Dopodichè ho configurato vsftpd in modo che non entri in modalità passiva: pasv_enable=NO ed adesso da remoto posso accedere al mio server FTP


Grazie
infite dell'aiuto a tutti quanti

Un saluto, Matteo
Scrivi risposta

Ritorna a “Ubuntu su server”

Chi c’è in linea

Visualizzano questa sezione: 0 utenti iscritti e 6 ospiti