Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My question is what settings do I need to change and/or commands to run to allow me to log into my vsftpd system?

I am getting this error, when I login using ftp instead of sftp:

Name (localhost:dbadmin): dbadmin
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/dbadmin
Login failed.
ftp> 

This works when logging in using sftp@, but my server is behind a firewall, and I need to be able to login using ftp as well as sftp.

I have been looking at quite a few posts about the "OOPS" error but so far have had no luck logging in.

Here is some information about my system and settings:

I am running CentOS 6.4.

iptables and ip6tables are stopped and disabled.

My home directory is protected 700, and I have tried 750, just to see if that made a difference. It did not.

Here are the active lines in /etc/vsftpd/vsftpd.conf

anonymous_enable=NO
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

My login name is not in user_list.

share|improve this question
add comment

3 Answers 3

up vote 0 down vote accepted

I disabled selinux by following these instructions here. I was able to log in not using sftp.

To disable permanently, I edited /etc/selinux/config and set

SELINUX=disabled

After the reboot, I was able to log in normally.

share|improve this answer
add comment

Although disabling SELinux by SELINUX=disabled will solve the problem this would not be advisable. You can enable ftp user to access his home directory by configuring SELinux boolean value ftp_home_dir as below.

`setsebool -P ftp_home_dir=1`
share|improve this answer
    
Are the back ticks necessary, or result of inline and block formatting of code/commands? –  Anthon Oct 31 '13 at 6:48
add comment

you can always allow the FTP daemon full access to all files by running

setsebool -P allow_ftpd_full_access 1

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.