Cant login localhost FTP?
I had tried to login to the localhost FTP and then enter the username and password hat i had been created, later on its comes out the belowing error.
500 OOPS: cannot change directory:/home/eugene/mp3 Login failed. 421 Service not available, remote server has closed connection Can i know whats happening? Anyone knows please help...... Thank You..... |
seems you have specified a directory (../mp3/) as login dir that doesn't exist or you're not allowed to go there via ftp. also have a look for a file ../.netrc in your homedir.
which ftp server do you use? sl mritch. |
Sorry bout the double posting.............
I juz tried with another path, it works when i put the folder in /usr/ftp/pub/sharefolder Thanks for u help mritch...... 1 more question, how am i going to let my friends to access my FTP but without the FTP name? let say i want my FTP site with the name --> ftp tyj.com how am i going to do it? Please help... Thank You..... |
well. to actually have a internet address like ftp.tyj.com tyj.com has to be your own (bought) domain and dns records have to specify your machine as ftp.tyj.com
if you don't know what i'm talking 'bout you likely have an isp link (dsl or similar) and just get assigned an ip from your provider. in this case your friends will have to connect to this ip-address (which likely dynamicaly changes) on port 21 to get you via ftp. now be sure they are allowed (firewall-rules/dsl-router/..) to do so. if you have a fixed ip and you own tyj.com you'll have to set up bind (or something similar) and add a record ftp.tyj.com to your zone. for more info see the dns howto at www.tldp.org sl mritch. |
If your using a dynamic IP address then you can sign up with a dynamic IP hosting site like www.noip.com.
|
Thanks for the reply, but i am stil not clear for few parts
I had tried on the FTP i setup and it works only in localhost, Code:
[root@localhost eugene]# /etc/init.d/vsftpd start Anyone knows please help...... Thank You........ |
i don't know a specific website now, but you can always look at www.tldp.org or into docs that came with your ftp-server for more info.
now that ftp works on your local box you can try to reach it with another computer or simply try to connect to one of your local (external) interfaces. for example: my networkcard is etho and ip 192.168.1.30. so on the same machine i can do "ftp 192.168.1.30" to get to the ethernet and not the loopback interface. normaly there is some part in your vsftp-configuration file to accept queries from some addresses. so if you allow connection from any machine there anybody will be able to connect to the running ftp-server. just be sure to not have a firewall rule dropping packages to port 21/20 on your box. if you sit behind a router that forwards ftp traffic to your host properly your friends will be able to reach you with the ipaddress you get from your isp (at the uplink-interface). like michaelk mentioned there is a possibility to sign up to a service which mapps your dyn. address to a name. this makes it easier since you don't have to tell what your current ip adr. is when somebody tries to connect your machine. sl mritch. |
I had tried to setup local_enable=YES but my another computer stil cant abe to login my ftp site
This is the vsftpd.conf # 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=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 turning on ascii_download_enable enables malicious remote parties # to consume your I/O resources, by issuing the command "SIZE /big/file" in # ASCII mode. # These ASCII options are split into upload and download because you may wish # to enable ASCII uploads (to prevent uploaded scripts etc. from breaking), # These ASCII options are split into upload and download because you may wish # to enable ASCII uploads (to prevent uploaded scripts etc. from breaking), # without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be # on the client anyway.. #ascii_upload_enable=YES #ascii_download_enable=YES # # You may fully customise the login banner string: ftpd_banner=Welcome to TYJ's 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 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 pam_service_name=vsftpd userlist_enable=YES #enable for standalone mode listen=YES tcp_wrappers=YES So what should i do with this vsftpd.conf settings? My another computer also already install vsftpd and i had tried to login to ther FTP server computer it prompts ftp "my FTP server IP" ftp: connect: No route to host Anyone know what should i do now with the client computer and the FTP server somputer? Please help, thanks....... |
I had tried to disable my firewall and also tried to ping my FTP server from LAN client PC but it still having the same problem.
ftp: connect: No route to host Can i know what is happening? |
the local_enable lilkely mean that users which are valid users on the serving machine are allowed to connect.
no route to host ..tells me that the machine this comes from don't know where it should send it's packets to reach the host. post some information how your network looks like. on the machines do a "route -n" and post results. how do you try to connect the ftp-server & can you ping all the hosts sucessfully? sl mritch. tcp_wrappers !! could mean that you have to use the files /etc/hosts.allow and hosts.deny for access control. read the manpage for hosts_access (5) |
How to use the command "route"? Am i correct?
[root@localhost eugene]# route -n bash: route: command not found [root@localhost eugene]# ftp route -n ftp: route -n: Servname not supported for ai_socktype My network is using 2 pc and both connect to wireless router which is with firewall. One pc use for the FTP server and the another use as client. I connect my FTP server using ftp 192.168.1.xxx (FTP server IP) Both are able to ping each other well - FTP Server ping cleint - Client ping server [root@localhost eugene]# ping 192.168.1.xxx PING 192.168.1.xxx (192.168.1.xxx) 56(84) bytes of data. 64 bytes from 192.168.1.xxx: icmp_seq=0 ttl=64 time=0.165 ms 64 bytes from 192.168.1.xxx: icmp_seq=1 ttl=64 time=0.159 ms 64 bytes from 192.168.1.xxx: icmp_seq=2 ttl=64 time=0.157 ms What should i do now with tcp_wrappers? Yes or No? Shoud I edit the file /etc/hosts.allow and hosts.deny for the FTP cleint access? Inside my hosts.allow and hosts.deny files seems empty command, only comment inside..... Code:
# hosts.allow This file describes the names of the hosts which are Code:
# Thanks for the reply mritch, u really help me a lot.... |
i'm quite surprised your route command is not working.
could mean it's replaced by the (newer) ip command. since it's essential to know your routing please post the output of "ip route show " from both machines (hope it's working on your system). if it's not there you may have something i don't know or you missed installation of necessary networking tools (unlikely, as ping works). /etc/hosts.xxxxx these files decide which hosts are allowed to connect to a service that is managed by the tcp-wrapper. so for debug (now) add the following line in allow of your server: "ALL: 192.168.1." (or even ALL : ALL )..will allow your whole 192.168.1.*** net to connect. leave the deny empty. if everthing is working properly secure your system. you can find the gateway with the route/ip command and it's likely in your network setup scripts also. there should be a route to your local net: 192.168.1.0/24 dev eth0 proto kernel scaope link src 192.168.1.*** <- local interface and one for the default gw: default via 192.168.1.*** <- wl-router anyway ..since you can ping your machines i don't think your problem is your routing table. locate the logfile for the ftp-server. be sure it starts up ok. then do "less -S +F /var/log/***" with your daemon.log, auth.log, messages and your ftp-server.logfile and try to connect the server from your client: "netcat <server-ip> 21" should show a vsftpd message. another possible problem could be your /etc/inetd.conf. as you start your ftp-server as a (standalone) daemon it shouldn't be ran from inetd (also have a look for xinetd, which is another version) and comment out the ftp line (if there). sl mritch. |
Stil not able to work, those thing starts with "ip" with the same error....
[root@localhost eugene]# route -n bash: route: command not found Code:
[root@localhost eugene]# ip route show Code:
[root@localhost eugene]# ip address show Can i know what is going wrong? I cant even test the result and post to you........ |
wow, can you use telnet / ssh ? what kernel are you running?
sl mritch. |
I am using kernal 2.6.5-1.358, should i update the kernal version? Any references how to upgrade the kernal?
Code:
[eugene@localhost eugene]$ uname -r Code:
[eugene@localhost eugene]$ telnet Usage: ssh [options] host [command] Options: -l user Log in using this user name. -n Redirect input from /dev/null. -F config Config file (default: ~/.ssh/config). -A Enable authentication agent forwarding. -a Disable authentication agent forwarding (default). -X Enable X11 connection forwarding. -x Disable X11 connection forwarding (default). -i file Identity for public key authentication (default: ~/.ssh/identity) -t Tty; allocate a tty even if command is given. -T Do not allocate a tty. -v Verbose; display verbose debugging messages. Multiple -v increases verbosity. -V Display version number only. -q Quiet; don't display any warning messages. -f Fork into background after authentication. -e char Set escape character; ``none'' = disable (default: ~). -c cipher Select encryption algorithm -m macs Specify MAC algorithms for protocol version 2. -p port Connect to this port. Server must be on the same port. -L listen-port:host:port Forward local port to remote address -R listen-port:host:port Forward remote port to local address These cause ssh to listen for connections on a port, and forward them to the other side by connecting to host:port. -D port Enable dynamic application-level port forwarding. -C Enable compression. -N Do not execute a shell or command. -g Allow remote hosts to connect to forwarded ports. -1 Force protocol version 1. -2 Force protocol version 2. -4 Use IPv4 only. -6 Use IPv6 only. -o 'option' Process the option as if it was read from a configuration file. -s Invoke command (mandatory) as SSH2 subsystem. -b addr Local IP address. Thanks for the help mritch..... |
All times are GMT -5. The time now is 02:48 PM. |