LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 11-17-2003, 01:23 PM   #1
playroll
LQ Newbie
 
Registered: Mar 2003
Location: Netherlands
Distribution: Slackware
Posts: 7

Rep: Reputation: 0
Contents of multiple directories in one


I have several harddisks with the same directory structure, for example:

/hda1/documents/addresses.txt
/hda1/documents/telephone.txt
/hda1/work/schedule.dat

/hdb3/documents/emailaddresses.txt
/hdb3/work/projects.txt

I want one directory which "contains" this information:
/share/documents/addresses.txt
/share/documents/emailaddresses.txt
/share/documents/telephone.txt
/share/work/projects.txt
/share/work/schedule.dat

I fixed this writing a script which does a find in /hda1 and /hdb2 and creates the correct symlinks in /share. This works ok, but when I want to use this directory for some of the ftp users, it isn accesible because /share is outside the document root (which is /home).

To (try to) fix this, I used mount --bind. This shows the directory share, but the contents aren visible, because the original /hda1 and /hdb3 are outside the document root.

Is there a way to solve the problem? I don't want to copy the files either, since it's quite some data. It isn't neccesary for ftp users to write to this shared directory, just reading is ok.

Last edited by playroll; 11-17-2003 at 01:33 PM.
 
Old 11-17-2003, 01:54 PM   #2
LogicG8
Member
 
Registered: Jun 2003
Location: Long Island, NY
Distribution: Gentoo Unstable (what a misnomer)
Posts: 380

Rep: Reputation: 30
you could look into using lndir
 
Old 11-17-2003, 02:17 PM   #3
playroll
LQ Newbie
 
Registered: Mar 2003
Location: Netherlands
Distribution: Slackware
Posts: 7

Original Poster
Rep: Reputation: 0
Thank you, this makes my script more easy. The problem is, there are still links to a directory (/hda1 and /hdb3) outside of the document root. With mount --bind, this was no problem, with symlinks it is..

I think I'd just have to put the /share dir into the user's root.

Last edited by playroll; 11-17-2003 at 02:19 PM.
 
  


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
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 12:23 PM
TAR'ing multiple directories bob_man_uk Linux - Software 3 02-03-2005 11:08 AM
Help I need help tarring multiple files in multiple directories VisionZ Linux - Newbie 28 03-25-2004 05:25 PM
I want ls to not display contents of directories GameboyHippo Linux - Newbie 2 01-26-2004 03:47 AM
Multiple directories in .iso Wynd Linux - General 3 07-17-2003 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:39 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
Open Source Consulting | Domain Registration