Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to configure an FTP server using vsftpd on my CentOS server.

I have installed the FTP server using yum install vsftpd and followed: http://www.cyberciti.biz/tips/rhel-fedora-centos-vsftpd-installation.html to configure the server.

I have created a user, but when I try to connect via Filezilla, I get:

Response:   331 Please specify the password.
Command:    PASS *********
Response:   500 OOPS: cannot change directory:/home/username
Error:  Critical error
Error:  Could not connect to server

Looking the vsftpd log i get:

Thu Sep 1 11:41:19 2011 [pid 8535] CONNECT: Client "xx.xxx.xxx.xxx" Thu Sep 1 11:41:19 2011 [pid 8534] [username] OK LOGIN: Client "xx.xxx.xxx.xxx"

It seems to disconnect me from the server.

I can also logon via SFTP in Filezilla.

Thanks

UPDATED:

getsebool -a | grep ftp

allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> off
ftpd_connect_db --> off 
httpd_enable_ftp_server --> off
sftpd_anon_write --> off
sftpd_enable_homedirs --> off
sftpd_full_access --> off
sftpd_write_ssh_home --> off
tftp_anon_write --> off
share|improve this question
    
What is the output of getsebool -a | grep ftp? –  quanta Sep 1 '11 at 8:52
    
Updated my question with the outputs. –  terrid25 Sep 1 '11 at 9:13

1 Answer 1

up vote 3 down vote accepted
ftp_home_dir --> off

setsebool ftp_home_dir on and try again.

share|improve this answer
    
Ah, I can now login via FTP. Thanks!!! –  terrid25 Sep 1 '11 at 9:30
    
You need to set the P option in as setsebool -P ftp_home_dir on if you need the change to be persistent after reboot. –  Indika Oct 31 '13 at 6:13

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.