Prosíme přihlašte se nebo zaregistrujte.

Přihlašte se svým uživatelským jménem a heslem.
Vaše pomoc je stále potřeba!

Autor Téma: vsftpd Problem pri restarte [vyřešeno]  (Přečteno 4061 krát)

p3dr0

  • Návštěvník
  • Příspěvků: 46
vsftpd Problem pri restarte [vyřešeno]
« kdy: 18 Června 2011, 21:04:52 »
Zdravim vo spolok
Mam problem s nahodenym ftp serveru. :(
Tak rozhodol som sa pre vsftpd a postupoval som podla tohoto navodu
https://help.ubuntu.com/6.06/ubuntu/serverguide/C/ftp-server.html
zevraj nic zlozite, ale ked sa skusam prihlast cez ftp klienta tak stale ma vracia do okna kde pyta uzivatela a jeho heslo... a to som uz skusal aj davat aj root ucet aj vsetky co mam v linuxe a stale ma vrati spat a znova pyta prihlasovacie udaje? :(
hmm neviete niekto kde robim chybu??

za radu vopred dakujem :)
« Poslední změna: 22 Června 2011, 12:39:51 od Petr Merlin Vaněček »

pacholik

  • Závislák
  • ***
  • Příspěvků: 2072
Re: FTp server - vsftpd
« Odpověď #1 kdy: 18 Června 2011, 22:33:35 »
pošli obsah /etc/vsftpd.conf

p3dr0

  • Návštěvník
  • Příspěvků: 46
Re: FTp server - vsftpd
« Odpověď #2 kdy: 19 Června 2011, 17:37:45 »


pošli obsah /etc/vsftpd.conf

Tu je:
Kód: [Vybrat]
# 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=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
#
# 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/vsftpd.pem


a teraz mi to uz pise connection denied
hmmmm co na to hovoris?
« Poslední změna: 19 Června 2011, 20:30:47 od p3dr0 »

pacholik

  • Závislák
  • ***
  • Příspěvků: 2072
Re: FTp server - vsftpd
« Odpověď #3 kdy: 19 Června 2011, 17:53:26 »
no však odkomentuj ten řádek
Kód: [Vybrat]
#local_enable=YES
a restartuj vsftpd
Kód: [Vybrat]
sudo /etc/init.d/vsftpd restart

P.S. dlouhý výpisy dávej do code

Petr Merlin Vaněček

  • Moderátor
  • Závislák
  • ***
  • Příspěvků: 5057
    • Lomítkáři
Re: FTp server - vsftpd
« Odpověď #4 kdy: 19 Června 2011, 20:23:13 »
...
P.S. dlouhý výpisy dávej do code

Upraveno :)
Stiskni CTRL + W ...
80% mozku tvoří kapalina ... u některých brzdová

p3dr0

  • Návštěvník
  • Příspěvků: 46
Re: FTp server - vsftpd
« Odpověď #5 kdy: 19 Června 2011, 20:32:00 »
...
P.S. dlouhý výpisy dávej do code

Upraveno :)

aklurat som to isiel spravit si ma predbehol :D
a pacholik diki za radu uz som sa napojil na to som uplne zabudol dat prec tu hlupu mriezku :D
teraz sa idem vrhnut na dalsie nastavenie zatial diki za radu :)

p3dr0

  • Návštěvník
  • Příspěvků: 46
Re: FTp server - vsftpd
« Odpověď #6 kdy: 19 Června 2011, 21:52:36 »
no tak borci teraz riesim dalsi problem. Potrebujem aby uzivatel napriklad "aa" videl teda svoju zlozku v home a este jeden adresar, ktory by som mu potreboval presne urcit.
uz to tu raz bolo riesene
http://forum.ubuntu.cz/index.php/topic,53731.0.html
ale nedopatral som sa tam k odpovedi. Vyriesil som len prvu vec tym, ze som odkomentoval (chroot_local_user=YES), uzivatel "aa" teda vidi len svoju zlozku a nemoze sa hrabat v celom disku.
Teraz by ma zaujimalo ako docielim aby videl este aj konkretny adresar, ktoy mu ja zvolim?

pridava m este raz preistotu vsftpd.conf

Kód: [Vybrat]
# 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=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
#
# 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/vsftpd.pem
za radu vopred dakujem :)

pacholik

  • Závislák
  • ***
  • Příspěvků: 2072
Re: FTp server - vsftpd
« Odpověď #7 kdy: 19 Června 2011, 22:20:21 »
tak na tu složku udělej v domovskejch adresářích symlink a je to

p3dr0

  • Návštěvník
  • Příspěvků: 46
Re: FTp server - vsftpd
« Odpověď #8 kdy: 20 Června 2011, 10:24:25 »
tak na tu složku udělej v domovskejch adresářích symlink a je to

to ma tiez napadlo ale kedze nie je aktivovane chroot_local_user=YES  tak tym padom moze byt len v tej zlozke a tam aj ked vlozim symlink ho do toho symliku nepusit a to sam tam daval neviem ake prave na priecinok. (a len otvori ten priecinok a v nom ako keby nic)
Funguje ten symlink jedine vtedy ked zas zakomentujem chroot.... Ale pak zas si mozem behat po celom disku a to nechcem potrebujem, len aby videl ten priecinok, ktory mu ja zadam.  Ina metoda ta nenapada?

pacholik

  • Závislák
  • ***
  • Příspěvků: 2072
Re: FTp server - vsftpd
« Odpověď #9 kdy: 20 Června 2011, 15:03:06 »
Aha, už jsem se podíval na to odkazovaný vlákno. Je tam vysvětlený proč to nejde a řešení je tam taky. Do /etc/fstab přidáš
Kód: [Vybrat]
/co/mountuju /kam/mountuju bind bind 0 0

p3dr0

  • Návštěvník
  • Příspěvků: 46
Re: FTp server - vsftpd
« Odpověď #10 kdy: 21 Června 2011, 18:47:03 »
Aha, už jsem se podíval na to odkazovaný vlákno. Je tam vysvětlený proč to nejde a řešení je tam taky. Do /etc/fstab přidáš
Kód: [Vybrat]
/co/mountuju /kam/mountuju bind bind 0 0


jj presne ako vravis este ma napadal pouzit hard link, ale ten som akosi nemohol rozchodit. :(
Ale toto viazanie funguje perfektne :)
diki pacholik za tvoje rady a cas. Ftp server rozchodeny :)

jmp

  • Host
Re: FTp server - vsftpd
« Odpověď #11 kdy: 21 Června 2011, 18:57:58 »
jj presne ako vravis este ma napadal pouzit hard link, ale ten som akosi nemohol rozchodit. :(
bylo to v ramci jednoho filesystemu?
hardlink myslim nelze udelat z jednoho fs do druheho

p3dr0

  • Návštěvník
  • Příspěvků: 46
Re: FTp server - vsftpd
« Odpověď #12 kdy: 21 Června 2011, 21:20:56 »
jj presne ako vravis este ma napadal pouzit hard link, ale ten som akosi nemohol rozchodit. :(
bylo to v ramci jednoho filesystemu?
hardlink myslim nelze udelat z jednoho fs do druheho
a nie nebolo tak preto ma nepustilo...

Zdravim tak dalsi problem ... Vsetko ficalo ako malo a zrazu sa server zasekol a ked chcem dat restart vypisuje:

serverik:/home/aa# sudo /etc/init.d/vsftpd restart
Restarting FTP server: vsftpdNo /usr/sbin/vsftpd found running; none killed

a skusal aj preinstalovat a nic neviete kde problem? :(

jmp

  • Host
Re: vsftpd Problem pri restarte :(
« Odpověď #13 kdy: 21 Června 2011, 21:27:59 »
bezi vubec? - pokud ne, tak proste nelze ukoncit...
sudo ps -A | grep vsftpd

p3dr0

  • Návštěvník
  • Příspěvků: 46
Re: vsftpd Problem pri restarte :(
« Odpověď #14 kdy: 21 Června 2011, 21:51:07 »
bezi vubec? - pokud ne, tak proste nelze ukoncit...
sudo ps -A | grep vsftpd

chlape klobuk dole si frajer pomohlo
uz to frci jak ma:)

len tak bocne aby tomu rozumel: To vlastne on zamrzol a nesiel ukoncit a takto som ho tvrdo ukoncil?

jAster_BA

  • Závislák
  • ***
  • Příspěvků: 4165
  • FEI STU stole my soul, don't have time anymore :/
Re: vsftpd Problem pri restarte- Vyriesene
« Odpověď #15 kdy: 22 Června 2011, 01:21:08 »
Madafaka
Kód: [Vybrat]
man ps ten príkaz ti mal vyhodiť iba všetky procesy a z toho vycucnúť vsftpd
Mám doma všelijaké staré haraburdy ale najviac ma *censored*tie novšie s grafikou ATI/AMD... registered as user #520570

Linuxové počítadlo Automatická kompilácia jadra

jmp

  • Host
Re: vsftpd Problem pri restarte :(
« Odpověď #16 kdy: 22 Června 2011, 07:13:28 »
bezi vubec? - pokud ne, tak proste nelze ukoncit...
sudo ps -A | grep vsftpd

chlape klobuk dole si frajer pomohlo
uz to frci jak ma:)

len tak bocne aby tomu rozumel: To vlastne on zamrzol a nesiel ukoncit a takto som ho tvrdo ukoncil?

ukolem bylo opravdu jen vypsat bezici procesy vsftpd
rozhodne to stav zjistuje ale nemeni - tedy v tomto ohledu ani nepomaha ani neresi...

p3dr0

  • Návštěvník
  • Příspěvků: 46
Re: vsftpd Problem pri restarte :(
« Odpověď #17 kdy: 22 Června 2011, 13:20:37 »
bezi vubec? - pokud ne, tak proste nelze ukoncit...
sudo ps -A | grep vsftpd

chlape klobuk dole si frajer pomohlo
uz to frci jak ma:)

len tak bocne aby tomu rozumel: To vlastne on zamrzol a nesiel ukoncit a takto som ho tvrdo ukoncil?

ukolem bylo opravdu jen vypsat bezici procesy vsftpd
rozhodne to stav zjistuje ale nemeni - tedy v tomto ohledu ani nepomaha ani neresi...

no mne to mozem povedat pomohlo vypisalo cislo stavu a pak to uz slapalo ako malo.
Sice ked mi to znova vyhodilo tak to zo zaciatku nemalo presne ziadny vlyv, ale ked som sa s tym pohral a nieco vyhodil z conf., tak uz to opat vyhodilo cislo a uz to pak fici jak ma :)
takze diki za radu

jAster_BA

  • Závislák
  • ***
  • Příspěvků: 4165
  • FEI STU stole my soul, don't have time anymore :/
Re: vsftpd Problem pri restarte [vyřešeno]
« Odpověď #18 kdy: 22 Června 2011, 22:11:50 »
:D:D:D:D móre ja umrem :D:D:D
Mám doma všelijaké staré haraburdy ale najviac ma *censored*tie novšie s grafikou ATI/AMD... registered as user #520570

Linuxové počítadlo Automatická kompilácia jadra

 

Provoz zaštiťuje spolek OpenAlt.