Groups and Symlinks, is this safe?

Posted by sjohns on Super User See other posts from Super User or by sjohns
Published on 2010-05-09T20:35:56Z Indexed on 2010/05/09 20:39 UTC
Read the original article Hit count: 276

Filed under:
|
|
|

Hi,

Im trying to serve similar content over two websites, but don't want to have 2 of each file, especially when they are growing.

The basics, im running CentOS, with cPanel.

Is it safe to do the following, I have folder downloads1 in

/home/user1/www/downloads1/

i have user2,

can i make a group - groupadd sharedfiles add both users to the group:

useradd -g sharedfiles user1
useradd -g sharedfiles user2 

then chown -r -v user1:sharedfiles downloads1/

User 2 i want to have

/home/user2/www/downloads1

but i want it to be a symlink like

ln "downloads1" "/home/user1/www/downloads1/"

lrwxrwxrwx 1 user2 sharedfiles   11 May  9 14:20 downloads1 -> /home/user1/www/downloads1/

Is this a safe practice? Or is there a better way to do this if I want them both to be able to share the files for distribution over apache. Is there any drawbacks to this? Thanks in advance for any light shed on this. I'm not 100% sure weather this should have gone here or on serverfault.

© Super User or respective owner

Groups and Symlinks, is this safe?

Posted by sjohns on Server Fault See other posts from Server Fault or by sjohns
Published on 2010-05-09T20:35:56Z Indexed on 2010/05/09 21:00 UTC
Read the original article Hit count: 276

Filed under:
|
|
|
|

Hi,

Im trying to serve similar content over two websites, but don't want to have 2 of each file, especially when they are growing.

The basics, im running CentOS, with cPanel.

Is it safe to do the following, I have folder downloads1 in

/home/user1/www/downloads1/

i have user2,

can i make a group - groupadd sharedfiles add both users to the group:

useradd -g sharedfiles user1
useradd -g sharedfiles user2 

then chown -r -v user1:sharedfiles downloads1/

User 2 i want to have

/home/user2/www/downloads1

but i want it to be a symlink like

ln "downloads1" "/home/user1/www/downloads1/"

lrwxrwxrwx 1 user2 sharedfiles   11 May  9 14:20 downloads1 -> /home/user1/www/downloads1/

Is this a safe practice? Or is there a better way to do this if I want them both to be able to share the files for distribution over apache. Is there any drawbacks to this? Thanks in advance for any light shed on this. I'm not 100% sure weather this should have gone here or on serverfault.

© Server Fault or respective owner

Related posts about linux

Related posts about cpanel