Please support VectorLinux!

Author Topic: Linking directories....  (Read 1415 times)

deepsix

  • Member
  • *
  • Posts: 19
Linking directories....
« on: August 23, 2008, 08:51:09 am »
my senario goes like this:

Lets say I have 3 users on a machine and each user has a directory named data
i want to make a /home/data directory linked to all three users data directories and this /home/data directory should automagically update its contents when the users directories are updated that way we can share our data.
any help or suggestions appreciated.

newt

  • Vectorian
  • ****
  • Posts: 1132
Re: Linking directories....
« Reply #1 on: August 23, 2008, 11:31:08 am »
I think what you suggest should work fine, you just need to make sure that /home/data is read-/write-able by 'users' of your system.  Then simply create symbolically linked directories to /home/data for each user, and if you create a similar symbolically linked directory in /etc/skel then it should be added to any newly created user accounts of your system.

HTH!
newt

edit:
(as root)
mkdir /home/data
chown :users /home/data
ln -s /home/data /home/<username>/data
ln -s /home/data /etc/skel

You should wait for someone with more experience to comment before implementing these changes.
« Last Edit: August 23, 2008, 11:35:37 am by newtor »

deepsix

  • Member
  • *
  • Posts: 19
Re: Linking directories....
« Reply #2 on: August 24, 2008, 09:22:32 pm »
I think what you suggest should work fine, you just need to make sure that /home/data is read-/write-able by 'users' of your system.  Then simply create symbolically linked directories to /home/data for each user, and if you create a similar symbolically linked directory in /etc/skel then it should be added to any newly created user accounts of your system.

HTH!
newt

edit:
(as root)
mkdir /home/data
chown :users /home/data



no this doesnt work...i even tried hardlinking the directories
ln -s /home/data /home/<username>/data
ln -s /home/data /etc/skel

You should wait for someone with more experience to comment before implementing these changes.

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4072
Re: Linking directories....
« Reply #3 on: August 25, 2008, 04:50:08 am »
If there is a folder in the home dir named "data", you can not create a link with the same name in the same place. Try a different name.

newt

  • Vectorian
  • ****
  • Posts: 1132
Re: Linking directories....
« Reply #4 on: August 25, 2008, 06:27:29 am »
It seems I made another mistake.

This:
ln -s /home/data /etc/skel

should really be

ln -s /home/data /etc/skel/data