PDA

View Full Version : configurazione vsftp


gabasr581
21-01-2007, 21:58
Sto diventando matto...tutto cio' che voglio fare è creare 2 utenti, impostare nome utente e password e permettere a loro (e solo a loro) dopo aver inserito user id e password di accedere, scaricare e uploadare file e cartelle ognuno in un'unica cartella scelta da me senza che abbiano i privilegi per accedere al resto del sistema, se possibile vorrei che lo scambio di dati tra me e tali utenti fosse criptato. Insomma un sistema come quello che si puo' creare con flezilla su windows!
Ho visto parecchi how to sulla configurazione di vsftpd ma mi pare che si parli solo di utenti anonimi e locali!!!!

Questo è il mio file di configurazione:

# 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? (Beware - allowed by default if you comment this out).
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
#
# 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
#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=Welcome to blah FTP service.
#
# 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().
#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
#
#
# Debian customization
#
# Some of vsftpd's settings don't fit the Debian filesystem layout by
# default. These settings are more Debian-friendly.
#
# 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
#
# 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


Spero possiate dirmi che cosa modificare per ottenere l'effetto voluto!Le cartelle che voglio mettere a disposizione degli utenti sono nella cartella FTP creata nella mia home!siete la mia unica speranza!!!Ogni consiglio è ben accetto!!!! :mc: :muro:

bem80
22-01-2007, 08:55
ciao gabasr581,

devi configurare il server impostando gli utenti virtuali, un tempo mi ero aiutato con un'howto trovato su internet però non ricordo dove.

ho trovato soltanto un README.txt sul mio pc che indica :

"This example shows how to set up vsftpd / PAM with "virtual users".
A virtual user is a user login which does not exist as a real login on the
system. Virtual users can therefore be more secure than real users, beacuse
a compromised account can only use the FTP server."

:D

kingvi
22-01-2007, 10:30
ciao gabasr581,

devi configurare il server impostando gli utenti virtuali, un tempo mi ero aiutato con un'howto trovato su internet però non ricordo dove.

ho trovato soltanto un README.txt sul mio pc che indica :

"This example shows how to set up vsftpd / PAM with "virtual users".
A virtual user is a user login which does not exist as a real login on the
system. Virtual users can therefore be more secure than real users, beacuse
a compromised account can only use the FTP server."

:D
Ho giusto quello che serve spero. Ho fatto qualche tempo fa una guida in merito che trovi a questo (http://www.brokendreams.it/?p=23) indirizzo. Fammi sapere poi come è andata...

gabasr581
22-01-2007, 15:23
Intanto grazie per le risposte e... per la guida!!!!!!!!E' proprio quello che ci voleva!
Pero'...sto seguendo l'how to passo passo, ho creato il database con utenti e password l'ho copiato in /etc/pam.d, ho creato l'utente ftpuser e gli ho assegnato come Home la cartella /home/ftp...poi mi sono accorto che:
1)Nonostante nel menu Administration - Users and Groups la cartella /home/ftp risulti la Home dell user ftpuser, se ci clicco col tasto destro e vado in permission , l'owner risulta ancora essere 'root'...è normale?

2)Nel mio file di configurazione (quello riportato nel post precedente) mancano alcune delle opzioni riportate nella tua guida, tra cui, credo, quella per attivare i guests!!!

Consigli?

gabasr581
25-01-2007, 08:57
Buongiorno a tutti!Dopo qualche peripezia e grazie all'aiuto vostro e dia altri, sono riuscito quasi a far funzionare vsftpd...il quasi è dovuto al fatto che, mentre x l'download non ci sono problemi, l'upload di file e cartelle risulta impossibile!!!nel mio file di configurazione, ho permesso solo gli accessi anonimi con una password scelta da me e ho dato loro tuti i permessi (write_enable; mkdir; upload)...dove sbaglio?devo forse cambiare anche i permessi della cartella condivisa che vsftpd mi ha creato (home/vsftpd)...in attesa di un aiuto vi auguro una splendida giornata!!! Cool

Questo è il mio conf:

# 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? (Beware - allowed by default if you comment this out).
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
#
# 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=carcarlo
#
# 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
#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=Welcome to gabriele FTP service.
#
# 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().
#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
#
#
# Debian customization
#
# Some of vsftpd's settings don't fit the Debian filesystem layout by
# default. These settings are more Debian-friendly.
#
# 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
#
# 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
#
# Set to YES if you want only a specified list of e-mail passwords
# for anonymous logins to be accepted. This is useful as a low-
# hassle way of restricting access to low-security content without
# needing virtual users. When enabled, anonymous logins are pre‐
# vented unless the password provided is listed in the file speci‐
# fied by the email_password_file setting. The file format is one
# password per line, no extra whitespace. The default filename is
# /etc/vsftpd.email_passwords.
secure_email_list_enable=YES
#
# If vsftpd is in standalone mode, this is the maximum number of
# clients which may be connected. Any additional clients connect‐
# ing will get an error message.
max_clients=2

kingvi
29-01-2007, 21:12
Certo, vanno cambiati anche i permessi della cartella: è il punto 11 della mia guida.
11. Modificare le autorizzazioni sulla cartella /var/ftp come gruppo ‘users’
:)

gabasr581
30-01-2007, 08:22
grazie ancora e perdona l'ignoranza...quando ho installato vsftpd alla fine il programma mi ha detto di aver creato un utente ftp appartenente al gruppo "nogroups" e che "NOT creating" la cartella /home/ftp (che invece ha creato)...ora ho 3 domande:

1)dov'è l'utente ftp, visto che tra gla lista degli utenti non lo trovo malgrado esista?
2)La cartella /home/ftp è la home dell' utente ftp anche se appartiene a root?
3)Puoi dirmi di preciso come devo cambiare i permessi per permettere l'upload?

Grazie!!!

kingvi
30-01-2007, 12:53
1) Ti riporto il punto dove viene definito l'utente:
9. Dichiariamo dove sarà la cartella dove andranno ad accedere gli utenti e creiamo un utente chiamato ‘ftpuser’:

useradd -d /var/ftp ftpuser
ls -ld /var/ftp

L'utente in questo caso si chiama 'ftpuser' e lo trovi sotto gli utenti del sistema.

2) Si.

3) Per le autorizzazioni a livello di cartella basta fare clic destro sulla cartella e impostare come gruppo di appartenenza 'users'

gabasr581
30-01-2007, 20:58
mmm...se faccio destro>cartella>Permessi mi dice che la cartella è del "root" e il gruppo è "nogroup"...non posso cambiare nulla perchè non ho i permessi necessari...non dovrei farlo loggandomi da root tipo con "sudo chmod..."?Se si, che tipo di "chmod" dovrei dare?

kingvi
30-01-2007, 21:34
Si hai ragione, lo devi fare da root. Io mi sono sempre loggato come root (uso ubuntu) e ho cambiato le autorizzazioni.

Stex75
30-01-2007, 21:37
Lo so, non è il max della sicurezza, ma io mi logo semplicemente con utente e psw del pc che fa da server ftp e posso prendere, eliminare e modificare come l'utente stesso. Mi serviva poter accedere in varie partizioni di dischi e su dischi esterni e questa mi è sembrata la miglior soluzione. Non faccio ftp su web, quindi.....

Ciauz!!

gabasr581
30-01-2007, 22:13
allora...dopo vari esperimenti, ho deciso didare un sudochmod 777 /home/ftp...ora la cartella appare ancora proprietà del root, ma io (loggandomi come utente normale) posso farci cio' che voglio...ora non mi resta che vedere (domani) se i due utenti che dovranno connettersi al server riescono ad uploadare file e cartelle...spero di non aver compromesso troppo la sicurezza cos' facendo!In fondo se qualche malintenzionato riuscisse a sfruttare il server ftp per fare casino nel pc, teoricamente, potrebbesoltanto muoversi all'interno della cartella /home/ftp...giusto?

kingvi
31-01-2007, 08:44
Teoricamente si! :read:

Ciccio75
31-01-2007, 11:56
La butto li ....

Crei due utenti
Editi /etc/passwd
Cambi /home/numeutente in /home/cartella_che_ti_pare
Cambi /bin/bash con /bin/false (per sicurezza)


Poi per quanto riguarda vsftp:
In /etc/vsftpd.ftpusers aggiungi tutti gli utenti che non vuoi accedano ad ftp
In /etc/vsftpd.conf:

anonymous_enable=NO
local_enable=YES
write_enable=YES
chroot_local_user=YES

kingvi
31-01-2007, 15:16
La butto li ....

Crei due utenti
Editi /etc/passwd
Cambi /home/numeutente in /home/cartella_che_ti_pare
Cambi /bin/bash con /bin/false (per sicurezza)


Poi per quanto riguarda vsftp:
In /etc/vsftpd.ftpusers aggiungi tutti gli utenti che non vuoi accedano ad ftp
In /etc/vsftpd.conf:

anonymous_enable=NO
local_enable=YES
write_enable=YES
chroot_local_user=YES

Però in questo modo se ti bucano il server ti bucano TUTTO! Nell'altro mal che vada, come detto, fanno danni SOLO all'interno della home (a patto sia stato impostato che non ci si può muovere da quella).

Ciccio75
31-01-2007, 15:45
Beh la home è chrotttata e la shell degli utenti non esiste .... la vedo difficile !!

Tutto è possibile comunque ...... :ops:

gabasr581
01-02-2007, 20:13
giusto un aggiornamento...con chmod 777 i client non riescono piu' a connettersi, si blocca tuto al momento della lettura delle directory...misteri...domani riprovo, altrimenti faccio una copia di vsftpd.conf e reinstall vsftpd...che pizza!!!!!

k4ez4r
15-05-2007, 17:02
Riporto a galla la discussione...

Vorrei capire quanto sia necessario, in una rete locale casalinga che sta dietro a un router, utilizzare gli utenti virtuali...
Perchè se ho capito bene in questo modo dovrei far girare anche un database o sbaglio? Preferirei invece occupare il minor numero di risorse possibile...

Lupalbe
21-01-2014, 10:32
Ciao
approfitto di questa discussione anche se datata per chiedere aiuto nella configurazione di vsftpd.
Lo scopo è lo stesso di 'gabasr' cioè creare 2 o + utenti, impostare nome utente e password e permettere solo a loro dopo aver inserito user id e psw di accedere, scaricare e uploadare file e cartelle ognuno in un'unica cartella scelta da me senza che abbiano i privilegi per accedere al resto del sistema.
Ho seguito una guida trovata su internet ma ad un certo punto dopo aver inviato un comando mi da errore.
Ho provato a cercare una soluzione ma non tutti seguono quella linea e alla fine non so cosa fare.... Sono una principiante in questo mondo.
Dato questo comando:
sudo useradd -c "Utente FTP" -g ftp-users -m -k /dev/null -s /bin/false -d /var/ftp/utenteftp utenteftp
---impossibile creare la directory /var/ftp/utenteftp
In precedenza ho creato il gruppo ftp-users ed inoltre è presente un file con la lista degli utenti ftp abilitati.
Dove sbaglio?

Grazie :)

eaman
22-01-2014, 01:32
Ho seguito una guida trovata su internet ma ad un certo punto dopo aver inviato un comando mi da errore.
He e' un po' criptico messo giu' cosi'...

Prova a spiegare:
a che punto di quale configurazione eri arrivato
che comando hai dato
che errore hai ricevuto.

Lupalbe
29-01-2014, 19:49
Quel problema è stato risolto, sono riuscita a creare le cartelle, gli account (2 di prova) e dare le relative password.
Ho due pc connessi allo stesso router, uno con Win7 l'altro Linux Lubuntu, ho provato ad installare filezilla su quello Win e digitando l'indirizzo 192.168.x.x mi si collega e vede la cartella con relativi file. Qui sorge un altro problema posso solo copiare i file e non posso caricare nulla, mi da 'Impossibile avviare il trasferimento'.
Altra cosa da filezilla inserendo l'indirizzo pubblico, mi nega l'accesso 'Tentativo di connessione non riuscito. Econnrefused... - impossibile collegarsi al server-
Di seguito trovi come ho configurato vsftpd

listen=YES
# Allow anonymous FTP? (Disabled by default)
anonymous_enable=NO
# 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
# 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=NO
# 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
# 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 fully customise the login banner string:
ftpd_banner=Benvenuto nel server FTP
# 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
# This string is the name of the PAM service vsftpd will use.
pam_service_name=/bin/false
#per motivi di sicurezza, agli utenti viene impedito l'accesso al server FTP
#se non sono esplicitamente dichiarati in un file specifico.
userlist_deny=NO
#Abilita il controllo della lista utenti autorizzati al login
userlist_enable=YES
#definisce il nome e la posizione della lista utenti abilitati al login
userlist_file=/etc/vsftpd.user_list
#cartella alla quale fanno riferimento
local_root=/home/.....

Devo aggiungere, modificare qualcosa.
Potrebbe esserci problemi a livello di porte abilitate?
Grazie :)

eaman
29-01-2014, 21:26
write_enable=YES
questo c'e' :)

L'utente che logga ha i permessi per scrivere dove vorrebbe? Fai una prova.

Magari fai una cartella con chmod 777 (rwxrwxrwx) e prova a caricarci dentro qualcosa dal client, poi va a vedere con che permessi / proprietario saltano fuori i file nella cartella.

-----
Per vedere se la porta TCP/IP e' aperta

nmap -p 21 indirizzo-ip

es. questa funzia:
conny:~:# nmap -p 21 192.168.0.1

Starting Nmap 6.40 ( http://nmap.org ) at 2014-01-29 22:24 CET
Nmap scan report for conny.andreamanni.com (192.168.0.1)
Host is up (0.00010s latency).
PORT STATE SERVICE
21/tcp open ftp


Eventualmente guarda che non ci sia un file /etc/default/vsftp che abbia un qualche istanza
listen=IP
listen-only=device
...

Lupalbe
30-01-2014, 19:48
Ho creato una cartella di prova 777, ho modificato la riga local_root=/home/....., (perchè da client posso solo vedere la cartella assegnata e non posso passare ad altre cartelle) da client è comparso l'errore '500 OOPS: VSFTPD: Refusing to run with writable root inside
chroot()
- Errore grave - impossibile collegarsi al server

Allora ho ripristinato la cartella di prima dando tutti i permessi e così funziona. Ho modificato i permessi da -> proprietà della cartelle impostando a tutto-> chiunque.
Quello che vorrei è che la possibilità di modifica sia riservata ai due account prova, quindi modificato contenuto-> proprietario e gruppo. Solo che hanno come gruppo ftp-users che è diverso da quello di amministratore e così facendo le cose non funzionano. La scritta è: 553 could not create file - errore critico trasf. file.

La questione ip esterno permane, sia che dia tutti i permessi o no, non riesce a collegarsi.
Ho verificato la porta 21 ed è ok: 21/tcp open.

Se ti può essere utile ti posto tutto il file vsftpd.

eaman
31-01-2014, 00:51
1. Finche non riesci a farlo andare decentemente e' un bene che non vada su IP pubblico.
0. Tu se conscio vero che FTP e' una porcheria desueta e si puo' fare praticamente tutto quello che fa ftp con SFTP che e' sicuro e non c'e' praticamente niente da configurare e installare fin tanto che hai SSH?
2. La cartella con permessi 777 va bene per far le prove in locale, se poi lo usi con un IP pubblico quella la devi sistemare. Il filesystem su cui puo scrivere FTP DEVE essere noexec, nosuid

Mi sembra di capire che hai dei problemi di permessi:
- vedi con che utente gruppo vengono creati i file nella cartella 777
- ragiona se questi vanno bene o se bisogna modifcare le impostazioni con cui gira il demone FTP / [user e gruppo che usa]
- oppure aggiungi gli utenti ai gruppi che usa FTP
- oppure fai lavorare sempre il demone con una ID fissa tipo nobody [o uno fatto apposta] e fagli le cartelle root di conseguenza

Ripeto: FTP fa schifo, sopratutto se lo vuoi usre su internet. Allora dovresti pure disabilitare le shell degli utenti che possono loggarsi con FTP.

Io ne starei alla larga, usa solo sFTP che non ti cambia niente: tanto anche filezilla e wsftp lo supportano. FTP e' in chiaro e antico, ci sono dei motivi per cui VSFTP fa di tutto per farti fare il meno possibile...

Lupalbe
01-02-2014, 18:46
Tu se conscio vero che FTP e' una porcheria desueta e si puo' fare praticamente tutto quello che fa ftp con SFTP che e' sicuro e non c'e' praticamente niente da configurare e installare fin tanto che hai SSH?

Io ne starei alla larga, usa solo sFTP che non ti cambia niente: tanto anche filezilla e wsftp lo supportano. FTP e' in chiaro e antico, ci sono dei motivi per cui VSFTP fa di tutto per farti fare il meno possibile...

Allora cosa dovrei fare? Installare filezilla e configurare quello?

eaman
02-02-2014, 13:10
Hai SSH installato? Sei gia' a posto!
Se no installalo: openssh-server

Dopodiche' invece che FTP usi sFTP, se usi client grafici i piu' famosi dovrebbero supportarlo. E a riga di comando usi scp che e' la cosa piu' comoda. Pure rsync e git li puoi fare semplicemente girare tramite SSH.

Poi ci sono tuttle le balle per conessioni con chiavi determinate, senza password, script copiano e sincronizzano automaticamente... E tutto piu' semplice e piu' sicuro con SSH, FTP e' la piu' grande porcheria che ci trasciniamo dietro dall'antichita' dopo telnet.