Symbolic Links Between User Accounts
- by Pez Cuckow
I have been using a cron job to duplicate a folder into another users account every day and someone suggested using symbolic links instead although I cannot get them to work.
In summary user GAMER generates log files that they want to access via HTTP, however I only have a web-server in the user account SERVER, in the past I would copy the logs folder from GAMERS account into SERVER/public_html/. and then chmod the files so the server could access them.
Trying to use symbolic links I set up a link from root (as only root can access both accounts) I used: ln -s /home/GAMER/game/logs/ /home/SERVER/public_html/logs
However it seems that only root can use this link, I tried chmoding the link, all the files in the gamers /game/logs/*, /game/logs itself to 777 as well as changing chown and chgrp to server the files still cannot be read.
When viewed from servers account my shell shows the link and where it is to hi-lighted in black with red text.
Am I doing something wrong? Please enlighten me!
/home/GAMER/game/ (chmod & chgrp)
drwxrwxrwx 3 SERVER SERVER 4096 2011-01-07 15:46 logs
/home/SERVER/public_html (chmod -h & chgrp -h)
lrwxrwxrwx 1 server server 41 2011-01-07 19:53 logs -> /home/GAMER/game/logs/