Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set up a CentOS 6.2 VirtualBox along with FTP and Apache root of /var/www/html/.

By default, the user ftp account is set to /home/user_name/.

However, I'm guessing it's common practice to give that user access to the /var/www/html/.

I was able to mount and bind the directory to the user directory as such:

mkdir /home/ftp_user/html/
mount --bind /var/www/html/ /home/ftp_user/html/

But as soon as I shut down my VirtualBox, this bind disappears.

Is there any way to make this permanent?

share|improve this question
up vote 7 down vote accepted

Sure - put the bind mount in your /etc/fstab. Device is your source directory, mount point is your mount point, and the type is 'bind'.

Something like this:

/var/www/html/ /home/ftp_user/html/ bind rw,bind 0 0
share|improve this answer
awesome! it worked – AlxVallejo Feb 17 '12 at 22:44

I found this line in /etc/fstab worked, perhaps more correctly using "none" as the filesystem type instead of "bind":

/var/www/html/ /home/ftp_user/html/ none rw,bind 0 0
share|improve this answer

Your Answer


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.