LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-21-2009, 10:09 PM   #1
vertigo12369
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...

Code:
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?

Code:
/dev/hdb1  /home 	ext2  	defaults  1 2
Would mount the hard disk /dev/hdb1 to the /home directory. Would I want
Code:
/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.

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

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

Code:
/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

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

Original Poster
Rep: Reputation: 0
Awesome!

Everything works now. Thanks for your input!
 
  


Reply


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


All times are GMT -5. The time now is 01:18 AM.

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