0

I'm using vsftpd on Red Hat Linux. I want to enable anonymous user login. After all the configurations, I can login without username and password. However I see nothing in the user's home directory. Here are my configurations:

vsftpd.conf:

anonymous_enable=YES
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
anon_root=/var/www/html/drawbmp

user ftp in /etc/passwd:

ftp:x:14:50:FTP User:/var/www/html/drawbmp:/sbin/nologin

The permission of /var/www/html/drawbmp is 755. There are several bmp pictures in it, they have 777 permission;

How can I solve this problem ?

  • Any relevant messages in your vsftpd logs ? Do you have SELinux enabled and if so have you looked in /var/log/audit/audit.log for relevant AVC denied messages ? – user9517 Apr 24 '14 at 7:47
1

My blind guess is that ftp_home_dir SELinux boolean prevents this.

Try semanage boolean -l | grep "ftp_home", if it returns off off, then please try

semanage boolean ftp_home_dir on

If that resolves your problem, you could then take vsftpd virtual users into use and use only those accounts for FTP, and then disable the now-permitted home directory access via FTP with semanage boolean ftp_home_dir off.

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.