VectorLinux
July 22, 2014, 10:49:41 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Linking directories....  (Read 1172 times)
deepsix
Member
*
Posts: 19


« 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.
Logged
newt
Vectorian
****
Posts: 1132



« 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 » Logged
deepsix
Member
*
Posts: 19


« 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.
Logged
nightflier
Administrator
Vectorian
*****
Posts: 4018



« 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.
Logged
newt
Vectorian
****
Posts: 1132



« 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
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!