Jump to content

Vsftpd I Problem


szczepanb
 Share

Recommended Posts

Witam serdecznie.

 

Zainstalowalem na swoim serwerze Fedore 10. Wszystko ładnie pięknie, ale niestety mam problem z FTP. Używam vsftpd jako demona ftp. Konfiguracja jest standardowa, taka jaka przyszła z "fabryki". Generalnie wszystko łączy się itd.. (co wyklucza błędy w firewall iptables) jednak... problem w tym, ze nie moge wgrac na serwer zadnego pliku. Dostaje zwrotki... (Total Commander) Transfer Done but failed to open directory.

 

Proszę serdecznie o pomoc bo juz naprawde nie wiem co jest nie tak.

 

Pozdrawiam

 

moj gg 7231354 w razie gdyby ktos byl uprzejmy

 

 

  • Downvote 1
Link to comment
Share on other sites

Fakt, przepraszam, że podałem nr gg.

 

Łączę się na konto, które zostało dodane "tradycyjnie do systemu"...tzn. adduser.

Po wydaniu komendy ls -l w katalogu domowym użytkownika do którego chciałbym wgrywac pliki mam odpowiedz.

 

Razem 0

 

---


# Example config file /etc/vsftpd/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.
#
# 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.
# 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=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 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
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd whith two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

---

Prosze serdecznie o pomoc. Kombinowalem juz naprawde na wszystkie sposoby i ciagle nic :((

Edited by WalDo
dodanie znaczników
Link to comment
Share on other sites

Hmm wygląda dobrze...

 

Po wydaniu komendy ls -l w katalogu domowym użytkownika do którego chciałbym wgrywac pliki mam odpowiedz.

 

Jakie są uprawnienia dostępu do tego katalogu? Jak został założony? Przez adduser, czy ręcznie przez roota? Próbowałeś w katalogu domowym założyć następny katalog (przez klienta FTP)? Da się? Da się tam nagrać pliki?

 

Ogólny mój wniosek jest taki, że masz pokręcone uprawnienia. Vsftpd jest raczej bezproblemowym programem, ale czasem się buntuje jak jest uruchomiony w "potencjalnie niebezpiecznej" konfiguracji.

 

Zaglądałeś do logów? Coś ciekawego?

 

[edit]

 

Prosta konfiguracja przykładowa

Link to comment
Share on other sites

probowalem uzyc tej konfiguracji przykladowej, niestety efekt ten sam.

 

w logach nic generalnie nie ma, jest info ze polaczenie ustanowione i koniec, nie ma bledow

 

tez mam wrazenie ze cos jest nie tak z uprawnieiami, jednak jest to swiezutki system, dopiero co zainstalowany. na fedorze 6 zaraz po instalacji wszystko chodzilo jak trzeba, tutaj mam niestety problemy ciagle :(

 

jak moge dojsc co jest nie tak z uprawnieniami ?

 

pozdrawiam i prosze o pomoc

Link to comment
Share on other sites

A moje pytania?

Jakie są uprawnienia dostępu do tego katalogu? Jak został założony? Przez adduser, czy ręcznie przez roota? Próbowałeś w katalogu domowym założyć następny katalog (przez klienta FTP)? Da się? Da się tam nagrać pliki?
Link to comment
Share on other sites

Tutaj niestety nie wiem jak sprawdzic uprawnienia katalogu ... az wstyd sie przyznac:/ W Midnightcie Commanderze sprawdzilbym.. gdyby pod F9 w Maku nie bylo Spaces... Natomiast katalog domowy zostal zalozony automatycznie przez dodanie uzytkownika adduser w terminalu. Probowalem zalozyc katalog, niestety nie da sie :/

 

 

Link to comment
Share on other sites

ls -l /home

 

W Midnightcie Commanderze sprawdzilbym.. gdyby pod F9 w Maku nie bylo Spaces...
A konsola makowa nie obsługuje kliknięć myszą? Wystarczy myszką kliknąć: F9 ETYKIETA na dole w konsoli w MC ;)
Link to comment
Share on other sites

no wlasnie nie obsluguje :/

 

czy ktos ma jakies rozwiazanie mojego problemu.. ? az dziw bierze ze trzeba kombinowac w fedorze 10, skoro w fedorze 6 wszystko dzialalo super bez zadnego klopotu

 

 

@morsik dziekuje za polecenie

 

 

drwx------ 5 pepan pepan 4096 maj 30 00:41 pepan

drwx------ 6 telemate telemate 4096 maj 30 00:44 telemate

drwx------ 4 test test 4096 cze 1 14:43 test

drwxrwxrwx 4 test22 test22 4096 cze 1 14:15 test22

 

 

 

to dostalem

z testem22 kombinowalem ale nic to nie dalo

 

 

Link to comment
Share on other sites

Jeszcze kilka strzałów:

 

1. Skoro korzystasz z TC, to w jakim trybie? Passive? Active? Spróbuj zmienić.

2. Wyłącz firewall na chwilę i zobacz czy coś da.

3. Czy lokalnie ftp działa? Tzn. z powłoki serwera?

 

Więcej pomysłów nie mam. U mnie działa na każdej maszynie - RedHat9, Fedora6, Fedora7, Fedora10

 

[bartek@evo home]$ ls -la
total 8
drwxr-xr-x  3 root   root     19 2009-01-25 13:18 .
drwxr-xr-x 22 root   root   4096 2009-04-08 18:41 ..
drwx------ 27 bartek bartek 4096 2009-05-19 14:50 bartek

 

[root@evo ~]# cat /etc/vsftpd/vsftpd.conf  | grep -v "#"
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

 

# ftp 169.254.0.7
Connected to 169.254.0.7.
220 (vsFTPd 2.0.5)
Name (169.254.0.7:root): bartek
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> put backup_www
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 File receive OK.
local: backup_www remote: backup_www
302 bytes sent in 0.0017 seconds (170.54 Kbytes/s)
ftp> bye
221 Goodbye.

Link to comment
Share on other sites

hej

W total commanderze ustawialem i tryb pasywny i aktywny - tez bez skutku

Niestety nie moge wylaczyc firewalla na chwie nawet.. dopiero za 2 tyg jak bede w domu bede mogl to zrobic

Prosze wytlumacz jak sprawdzic czy dziala z powloki serwera bo niestety nie wiem :/

 

PS. Czuje sie totalnie jak lamer :/

 

Pozdrawiam

Link to comment
Share on other sites

To moze ja cos napisze jako ze to pierwszy post. Skoro mozesz sie polaczyc i nie mozesz wgrac pliku na serv i masz selinuxa to:

pokaz

ls -Zd  /sciezka do katalogu udostepnienego

 

Jak chcesz wylaczyc Selinuxa i sprawdz to

echo > 0 /selinux/enforce

albo

setenforce disabled

 

Jak chcesz dzialac z Selinuxem to ustaw katalog do ktorego chcesz uploadowac pliki i odpowiednia dyrektywe fo vsftpd

 setsebool -P allow_ftpd_anon_write 1

 chcon -R -t public_content_rw_t /sciezka do katalogu

 

Aha i jeszcze jest jedna opcja w vsftpd.conf pozwalaja uploadowac pliki dla anonymous

#anon_upload_enable=YES

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...