Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 02-23-2008, 04:44 PM   #1
Registered: Jul 2003
Distribution: openSUSE Linux, Apple Darwin UNIX
Posts: 66

Rep: Reputation: 15
mount --bind on my FTP server

I have a hard drive that my openSuSE 10.3 system is running on and then an extra 300 GB hard drive mounted as /ftp that I am using for my FTP storage using vsftpd. Each user on the system also has a /home/username/ftp/ folder in their own personal home directory and that /home/username/ftp/ folder is connected via mount --bind to /ftp/username/ so that each person can get in a web browser and access their personal FTP directory. This is working great and not a problem in the slightest, but there is one really big problem and I'm not sure how to resolve it. Every time the power goes out or a user reboots the system, all bindings made by mount --bind are lost and must be re-bound one by one by me personally as the administrator after the reboot. How can I make these dirctories automatically be mount --bind'ed each time the computer boots so that I don't have a screwed up FTP server with directories that lead to nowhere everytime the power goes out or a user reboots. This is in a home network, so all users have the rights to reboot or shut down if they feel it is necessary, and I want to keep it that way, but just resolve the mount --bind issue. Any ideas?

Last edited by LUB997; 02-23-2008 at 04:45 PM.
Old 02-23-2008, 09:02 PM   #2
Registered: Aug 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 110Reputation: 110
You should be able to put something like
mount --bind /home/username/ftp /ftp/username
in something like /etc/init.d/rc.local or /etc/rc.d/rc.local. That way when the system starts up, it should run that script and mount the directories the way you need it.
Old 02-26-2008, 12:19 PM   #3
Registered: Jul 2003
Distribution: openSUSE Linux, Apple Darwin UNIX
Posts: 66

Original Poster
Rep: Reputation: 15
Thanks, I'll try it and let you know if it works. There's supposed to be a way of editing /etc/fstab to do it too, but it looks kinda complicated and I like your way better.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with ftp server bind: address allready in use Diode Linux - Distributions 6 11-18-2009 01:27 AM
Mount bind read-only kramer2718 Linux - General 9 08-31-2008 10:14 AM
How do I import bind ".hosts" files into another BIND server chantman Linux - Software 0 06-30-2006 11:51 AM
persistent mount --bind linuxnube Linux - Software 0 05-12-2004 08:24 PM
mount --bind on boot tp6400 Linux - Newbie 1 01-25-2004 09:41 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration