VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

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

deepsix

  • Member
  • *
  • Posts: 19
Linking directories....
« on: August 23, 2008, 09: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.
Logged

newt

  • Vectorian
  • ****
  • Posts: 1132
Re: Linking directories....
« Reply #1 on: August 23, 2008, 12:31:08 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
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, 12:35:37 pm by newtor »
Logged

deepsix

  • Member
  • *
  • Posts: 19
Re: Linking directories....
« Reply #2 on: August 24, 2008, 10: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.
Logged

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4141
Re: Linking directories....
« Reply #3 on: August 25, 2008, 05: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.
Logged

newt

  • Vectorian
  • ****
  • Posts: 1132
Re: Linking directories....
« Reply #4 on: August 25, 2008, 07: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
Logged