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.

I enabled this in vsftpd.conf

chroot_local_user=YES

chroot_list_enable=YES

chroot_list_file=/etc/vsftpd.chroot_list

user_config_dir=/etc/vsftpd_user_conf

and here is the user set in vsftpd_user_conf dirctory

ftpupload :

local_root=/mnt/upload

But /mnt/upload is mounted from another directory

/mnt/upload on /opt/upload type none (rw,bind)

Here is the list in /mn/upload

rough_images/

shoes-pentland/

vendor-upload/

shooting/

Additional, the shooting/ directory is mounted from another place

/mnt/upload/shooting on /mnt/shooting none (rw,bind)

Now here is the problem.

When I use the ftp client to move the files between the directories but failed .Files can moved between any directories except the shooting one.

The permission is right . I can move any files between this directories successful by using su ftpupload.

It means the vsftpd didn't support the mount bind?


Here is the vsftpd.conf

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=000
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=app
xferlog_std_format=NO
log_ftp_protocol=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
user_config_dir=/etc/vsftpd_user_conf
ls_recurse_enable=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
pasv_enable=YES
pasv_max_port=***
pasv_min_port=***
port_enable=YES
pasv_address=***
virtual_use_local_privs=YES
tcp_wrappers=YES

and here is the mtab:

    /mnt/upload /opt/upload none rw,bind 0 0
    /mnt/upload/shooting /mnt/shooting none rw,bind 0 0

all of the permissions under the /mnt/upload are the same:

drwxrwxrwx * ftpupload app

share|improve this question
    
I have used vsftd with mount bind before with no issues. Can you verify the permissions are set correctly on ALL of the folders? It sounds like a permission issue –  Nic Young Feb 23 '12 at 7:21
    
@NicYoung I doubted it may caused by permission issue at first. But I have the write permission when I ssh on the server with the user.I am sure the permission is right. Did you mount the directory like me ? Not mount only one , but any ? –  frankyue Feb 23 '12 at 9:05
    
Yes I had many folders mounted under my ftp root directory. I would ensure that your user has write permissions to these mounted folders as well. –  Nic Young Feb 23 '12 at 14:41
    
@NicYoung yes I login with ftpupload username to the server , create new files and move any files between these directories. BTW, I chmod all of the directories with 777 mode. –  frankyue Feb 23 '12 at 15:25
    
Ok can you post your vsftpd.conf and /etc/fstab? Also if you can post the permissions for all of the directories under ftp root. –  Nic Young Feb 23 '12 at 15:54
show 1 more comment

1 Answer 1

Are you chrooting the user into /mnt/upload? The problem may be that vsftpd detects /mnt/upload/shooting to be outside the chroot, although I would expect the bind mount to make this work. Try disabling the chroot or chrooting the user to /mnt.

share|improve this answer
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.