Unable to connect to Server machine from a client machine using ftp service | Unix Linux Forums | Linux

  Go Back    


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

Unable to connect to Server machine from a client machine using ftp service

Linux


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-26-2013
raosr020 raosr020 is offline
Registered User
 
Join Date: Nov 2012
Last Activity: 1 September 2014, 10:42 PM EDT
Posts: 21
Thanks: 11
Thanked 0 Times in 0 Posts
Tools Unable to connect to Server machine from a client machine using ftp service

Hi,

Could you please help me with the below issue..

I'm running RHEL6 OS on both server (192.168.0.10) and client machines (192.168.0.1).

I'm trying to connect to server from the client machine using ftp service.

I have installed vsftpd daemon on both the machines.

I'm getting the below error. Please help me with the below issues.

500 OOPS: cannot change directory:/home/server
Login failed.
ftp> ls
421 Service not available, remote server has closed connection
Passive mode refused.


Code:
[root@Client ~]# ftp 192.168.0.10
Connected to 192.168.0.10 (192.168.0.10).
220 (vsFTPd 2.2.2)
Name (192.168.0.10:root): server
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/server
Login failed.
ftp> ls
421 Service not available, remote server has closed connection
Passive mode refused.
ftp>

Sponsored Links
    #2  
Old 03-26-2013
war49 war49 is offline
Registered User
 
Join Date: Mar 2011
Last Activity: 26 March 2013, 8:40 AM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Can you confirm about what the permission and who is owner of /home/server directory ?
Sponsored Links
    #3  
Old 03-26-2013
bitlord bitlord is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 1 October 2014, 2:04 PM EDT
Posts: 333
Thanks: 12
Thanked 41 Times in 39 Posts
Check you firewall. Check your permissions and groups.

I would also think about not using ftp and instead use scp with is much more secure.
    #4  
Old 03-28-2013
hergp hergp is offline Forum Advisor  
Problem Eliminator
 
Join Date: Jan 2010
Last Activity: 30 October 2014, 7:14 AM EDT
Location: Vienna, Austria
Posts: 802
Thanks: 18
Thanked 168 Times in 150 Posts
It bet, this is a SELinux related problem. On the server system, run this command as root


Code:
setsebool -P ftp_home_directory 1

It is necessary to allow read and write access to user home directories.
Sponsored Links
    #5  
Old 03-28-2013
rbatte1 rbatte1 is offline Forum Staff  
Moderator
 
Join Date: Jun 2007
Last Activity: 24 October 2014, 3:13 PM EDT
Location: Lancashire, UK
Posts: 1,869
Thanks: 599
Thanked 322 Times in 290 Posts
If the home directory of the ser you are connecting with does not exist, then there is also the chance that you are in jail. Not with bars and locks etc, but vsftp by default will not allow you to change directory out of your home directory. There is a directive to examine in /etc/vsftp/vsftp.conf on the server you are connecting to.

I have enabled myself (hard luck to my colleagues as they haven't worked it out for themselves yet or asked) by having the following section:-

Code:
# 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_local_user=YES
chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list

You can see that I'm accepting the default file for the list of allowed users. This simply contains the user name I connect with:

Code:
# cat chroot_list
RBATTE1
#

I hope that this helps. The documentation is there, but first you have to work out what to look for, so it took me ages. I agree that SELINUX might be getting in the way here too - see post #4



Robin
Liverpool/Blackburn
UK
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
FTP While transfering files to local machine to remote machine Venkatesh1 UNIX for Advanced & Expert Users 2 03-01-2013 09:58 PM
machine server and machine client herbich1985 Solaris 0 05-06-2012 06:12 AM
unable to connect internet on virtual machine Arun_Linux Virtualization and Cloud Computing 0 04-07-2012 01:26 PM
How to shutdown client machine from the server mvictorvijayan Shell Programming and Scripting 1 03-06-2008 09:20 AM
ftp connect from unix to NT machine anthreedhr Windows & DOS: Issues & Discussions 8 09-07-2005 11:48 AM



All times are GMT -4. The time now is 12:42 AM.