2

I tried making a VSFTPD user with access to all of our clients' FTP folders. (the users are all chroot'ed to their home directories, where the public_html folders are).

What I did was create a new FTP user and created a client directory inside /home/global_user/. Then I used the following command to mount the client's user directory into the global user directory, like this:

mount --bind /home/global_user/client_directory /home/client/

What happened next is that indeed the folder was mounted, but all the files in the original folder are gone! They don't appear in the new mount either.

1 Answer 1

2

mount --bind olddir newdir

So after running

mount --bind /home/global_user/client_directory /home/client/

the original contents (none) of /home/global_user/client_directory are also available in /home/client/. You can't see the original contents of /home/client because you overlayed your new empty directory on top!

Just umount this, and try again with the arguments reversed.

3
  • Thank for your reply my friend. I tried to umount both folders, and I get "device is busy" for both directories, even when sudoing it.
    – pilau
    Feb 20, 2012 at 14:41
  • That means some process is touching the mount target (/home/client) - make sure no shell is in there and try again (lsof +D /home/client may help). Oh, and you're only trying to umount /home/client.
    – Useless
    Feb 20, 2012 at 14:48
  • I figured it out - umount -l /home/client/ did the trick :) Thank you for your help.
    – pilau
    Feb 20, 2012 at 14:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .