2

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
1
4

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.

1

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

0

This is likely an SELinux issue, try setting

/usr/sbin/setsebool -P ftp_home_dir 1

and see if that fixes it.

1
  • selinux is disabled. – Aman Aug 28 '12 at 20:15

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.