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.
[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>
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:-
# 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:
# 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