LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-09-2004, 05:15 AM   #1
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Rep: Reputation: 30
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.....
 
Old 10-09-2004, 06:28 AM   #2
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
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.
 
Old 10-09-2004, 09:32 AM   #3
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
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.....
 
Old 10-09-2004, 10:24 AM   #4
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
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.
 
Old 10-09-2004, 11:45 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
If your using a dynamic IP address then you can sign up with a dynamic IP hosting site like www.noip.com.
 
Old 10-10-2004, 11:10 AM   #6
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
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
Starting vsftpd for vsftpd:                                [  OK  ]
[root@localhost eugene]# ftp localhost
Connected to localhost (127.0.0.1).
220 Welcome to TYJ's FTP
Name (localhost:eugene): testing
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (127,0,0,1,71,19)
150 Here comes the directory listing.
-rwxrwxrwx    1 0        501       4323612 Oct 09 14:15 Richard Marx - Endless Summer Nights.mp3
-rwxrwxrwx    1 0        501       5077786 Oct 09 14:15 Richard Marx - Hazard.mp3
-rwxrwxrwx    1 0        501       4448339 Oct 09 14:15 Richard Marx - Hold On To The Night.mp3
-rwxrwxrwx    1 0        501       3434241 Oct 09 14:15 Richard Marx - Now and Forever.mp3
-rwxrwxrwx    1 0        501       4230164 Oct 09 14:15 Richard Marx - Right Here Waiting.mp3
-rwxrwxrwx    1 0        501       3524772 Oct 09 14:15 Richard Marx And Donna Lewis - At The Beginning (Anastasia Soundtrack).mp3
226 Directory send OK.
ftp>
Can i know how to setup FTP address for my friends to login ? The steps by step to do it (any website for reference?)

Anyone knows please help......
Thank You........
 
Old 10-10-2004, 12:07 PM   #7
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
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.
 
Old 10-11-2004, 01:36 AM   #8
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
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.......
 
Old 10-12-2004, 08:32 AM   #9
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
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?
 
Old 10-12-2004, 09:26 AM   #10
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
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)

Last edited by mritch; 10-12-2004 at 09:34 AM.
 
Old 10-13-2004, 01:22 PM   #11
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
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
#               allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#

Code:
#
# hosts.deny    This file describes the names of the hosts which are
#               *not* allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow.  In particular
# you should know that NFS uses portmap!
Is there any thing deals with the Gateway IP?

Thanks for the reply mritch, u really help me a lot....
 
Old 10-13-2004, 03:31 PM   #12
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
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.

Last edited by mritch; 10-13-2004 at 03:32 PM.
 
Old 10-14-2004, 12:16 AM   #13
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
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
bash: ip: command not found
Code:
[root@localhost eugene]# ip address show
bash: ip: command not found
I also already installed the RPM --> iproute2-2.4.7-63057cl.i386.rpm

Can i know what is going wrong? I cant even test the result and post to you........
 
Old 10-14-2004, 08:47 AM   #14
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
wow, can you use telnet / ssh ? what kernel are you running?

sl mritch.
 
Old 10-18-2004, 12:11 AM   #15
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
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
2.6.5-1.358
I dont know about telnet and ssh. Does the bellow show my pc able to use it?

Code:
[eugene@localhost eugene]$ telnet
telnet>
[eugene@localhost eugene]$ ssh
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:hostort Forward local port to remote address
-R listen-port:hostort 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 hostort.
-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.....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
localhost login erick66 Linux - Newbie 7 11-08-2005 07:50 PM
Localhost Login???? gstate Linux - Security 8 10-13-2004 09:02 PM
localhost login Melo Linux - Software 10 05-18-2003 10:43 PM
localhost login, how?? magis Linux - Newbie 4 11-24-2001 05:05 AM
Localhost Login Roy Linux - General 3 05-14-2001 04:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration