4

Could you help me with vsftpd server. I am trying to configure it to make it work with virtual users. The problem is that I am still getting following error in ftp client:

500 OOPS: cannot change directory: [there is nothing more after : ]

Details:

# getenforce Disabled

#ls -al /home/back drwxrwxrwx+ 4 ftp ftp 4096 Jan 13 14:49 . drwxr-xr-x. 5 root root 4096 Dec 23 16:10 .. drwxrwxrwx. 2 ftp ftp 4096 Dec 3 18:00 it

#cat vsftpd.conf anonymous_enable=YES local_enable=YES virtual_use_local_privs=YES write_enable=YES local_umask=022 dirmessage_enable=YES xferlog_enable=YES connect_from_port_20=NO xferlog_std_format=YES ascii_upload_enable=YES ls_recurse_enable=YES listen=YES pam_service_name=vsftpd.virtual userlist_enable=YES tcp_wrappers=YES listen_port=12121 ftp_data_port=12020 pasv_min_port=12022 pasv_max_port=12099 user_sub_token=$USER local_root=/home/back/$USER chroot_local_user=YES hide_ids=YES guest_enable=YES allow_writeable_chroot=YES xferlog_file=/var/log/vsftpd.log xferlog_enable=YES dual_log_enable=YES port_enable=YES pasv_enable=YES pasv_promiscuous=YES

# cat /etc/pam.d/vsftpd.virtual

#%PAM-1.0 auth required pam_userdb.so db=/etc/vsftpd/vsftpd-virtual-user account required pam_userdb.so db=/etc/vsftpd/vsftpd-virtual-user session required pam_loginuid.so

Logs:

vsftpd.log (with "log_ftp_protocol=YES"):

Tue Jan 20 17:04:42 2015 [pid 13493] CONNECT: Client "127.0.0.1" Tue Jan 20 17:04:42 2015 [pid 13492] [test] OK LOGIN: Client "127.0.0.1" Tue Jan 20 17:06:57 2015 [pid 13584] CONNECT: Client "127.0.0.1" Tue Jan 20 17:06:57 2015 [pid 13584] FTP response: Client "127.0.0.1", "220 (vsFTPd 3.0.2)" Tue Jan 20 17:06:57 2015 [pid 13584] FTP command: Client "127.0.0.1", "USER test" Tue Jan 20 17:06:57 2015 [pid 13584] [test] FTP response: Client "127.0.0.1", "331 Please specify the password." Tue Jan 20 17:06:57 2015 [pid 13584] [test] FTP command: Client "127.0.0.1", "PASS <password>" Tue Jan 20 17:06:57 2015 [pid 13583] [test] OK LOGIN: Client "127.0.0.1"

secure:

Jan 13 17:49:35 localhost vsftpd[10198]: pam_userdb(vsftpd.virtual:auth): user 'test' granted access

Info:

Fedora 20 3.17.7-200.fc20.x86_64 #1 SMP Wed Dec 17 03:35:33 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Do you have any idea what should I change to be able to use vsftpd server?

2
  • selinux enabled? – c4f4t0r Feb 9 '15 at 11:32
  • # getenforce Disabled – TomCod Feb 9 '15 at 13:29
0

Note the + at the end of the . entry. This means that there is an alternate file access method in effect. Most likely this is an ACl. You can read the ACL using

getfacl /home/back

The output will likely point you in the correct direction to fix the problem.

1
  • I've just removed extra ACL using # setfacl -b -R /home/back/. Now there is no "+". Still getting same error. – TomCod Feb 9 '15 at 13:26
0

You're logging in as user test, and the following settings:

user_sub_token=$USER
local_root=/home/back/$USER

would make the virtual user's home directory (i.e. the directory the user will be placed in at login) be /home/back/test. But according to your directory listing, that directory doesn't exist.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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