Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-21-2009, 09:09 PM   #1
LQ Newbie
Registered: Feb 2008
Location: Canton, MI
Distribution: Ubuntu
Posts: 7

Rep: Reputation: 0
fstab and automounting permanent symlinks

I'm running a proftpd server (on Ubuntu 8.04 server) with user accounts chrooted to their home directories. I have a share directory that I want all users to access. So in order to get out of chroot jail I need to set up a symlink like so...

mount --bind /share /home/john/share
This works until I reboot the server. I want to make this symlink permanent which from what I understand requires an entry in the fstab file.

So the question is how do I automount a symlink?

/dev/hdb1  /home 	ext2  	defaults  1 2
Would mount the hard disk /dev/hdb1 to the /home directory. Would I want
/share  /home/john/share  auto  rw,auto,user,sync  0 0
? To mount my /share directory inside my chrooted /home/john/share?

All of the examples I have found are for automounting hardware not directories on existing hardware.

Old 04-22-2009, 01:48 PM   #2
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,074

Rep: Reputation: 386Reputation: 386Reputation: 386Reputation: 386
I haven't actually tested this but there's no reason why this wouldn't work, just add the bind option there.

/dir1 /dir2 none bind 0 0
I am not sure if the fs would be ok as none or if it would require the real fs or auto, whatever.

But you could also just mount the real device many times. I usually do things like these on desktop boxes with /tmp and /var/tmp

/dev/sdb9 /tmp ext2 noatime 0 1
/dev/sdb9 /var/tmp ext2 noatime 0 1
Old 04-23-2009, 12:00 PM   #3
LQ Newbie
Registered: Feb 2008
Location: Canton, MI
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0

Everything works now. Thanks for your input!


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
Automounting directory in fstab troubles cjtemple Linux - Newbie 9 01-07-2007 03:21 AM
FC 2: Automounting Windows partions (fstab) shelldinesh Linux - General 1 10-19-2005 04:53 PM
How to make changes to fstab permanent on FC4? odiseo77 Fedora 7 07-01-2005 08:52 AM
fstab changes and symlinks gone after reboot in FC3 GKid Fedora 1 03-15-2005 11:55 AM
fstab, device names, mnt points, symlinks rickenbacherus Linux - Software 8 03-24-2003 06:06 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:31 PM.

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