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

As soon as I login with my virtual users in ftp I get "cannot change directoy", I have the following configuration in vsftpd.conf. Please suggest

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=002
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd
pam_service_name=vsftpd
virtual_use_local_privs=YES
guest_enable=YES
user_sub_token=$USER
hide_ids=YES
user_config_dir=/data/some-path/ftp/users
local_root=/data/some-path/ftp/data/$USER
guest_username=vsftpd
share|improve this question
    
What does /var/log/vsftpd.log say? –  Mathias R. Jessen Aug 28 '12 at 21:46
add comment

3 Answers

up vote 2 down vote accepted

Looks like in order for the user to be able to be chroot'd to the directory configured, all the parent directories must have read and execute permissions, otherwise they will be denied for security reasons.

share|improve this answer
add comment

I think your users are going to be bound to their home directories with chroot_local_user=YES, maybe try setting your ftp user's home directory to /data/some-path/ftp/data/$USER else see what happens when with chroot_local_user=NO

share|improve this answer
add comment

This is likely an SELinux issue, try setting

/usr/sbin/setsebool -P ftp_home_dir 1

and see if that fixes it.

share|improve this answer
    
selinux is disabled. –  Aman Kumar Jain Aug 28 '12 at 20:15
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.